1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-29 23:12:55 +01:00
llvm-mirror/runtime/GCCLibraries/libc/memory.c
Chris Lattner 3a889be674 Fixes to be LP64 correct
llvm-svn: 2950
2002-07-18 00:15:29 +00:00

17 lines
465 B
C

//===-- 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>
void *malloc(size_t);
void free(void *);
void *memset(void *, int, size_t);
void *calloc(size_t nelem, size_t elsize) {
void *Result = malloc(nelem*elsize);
return memset(Result, 0, nelem*elsize);
}