*** empty log message ***
[oota-llvm.git] / runtime / GCCLibraries / libc / memory.c
1 //===-- memory.c - String functions for the LLVM libc Library ----*- C -*-===//
2 // 
3 // A lot of this code is ripped gratuitously from glibc and libiberty.
4 //
5 //===----------------------------------------------------------------------===//
6
7 #include <stdlib.h>
8
9 void *malloc(size_t);
10 void free(void *);
11 void *memset(void *, int, size_t);
12
13 void *calloc(size_t nelem, size_t elsize) {
14   void *Result = malloc(nelem*elsize);
15   return memset(Result, 0, nelem*elsize);
16 }