2002-03-09 00:20:52 +01:00
|
|
|
//===-- memory.c - String functions for the LLVM libc Library ----*- C -*-===//
|
|
|
|
//
|
|
|
|
// A lot of this code is ripped gratuitously from glibc and libiberty.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2002-07-18 02:15:29 +02:00
|
|
|
void *malloc(size_t);
|
2002-03-09 00:20:52 +01:00
|
|
|
void free(void *);
|
2002-07-18 02:15:29 +02:00
|
|
|
void *memset(void *, int, size_t);
|
2002-03-09 00:20:52 +01:00
|
|
|
|
|
|
|
void *calloc(size_t nelem, size_t elsize) {
|
|
|
|
void *Result = malloc(nelem*elsize);
|
|
|
|
return memset(Result, 0, nelem*elsize);
|
|
|
|
}
|