1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

Make all memory functions have weak linkage so that they can be overridden with

custom memory-management implementations (e.g., bash).

llvm-svn: 10478
This commit is contained in:
Misha Brukman 2003-12-15 22:32:50 +00:00
parent 062d3a4ab5
commit 94364aa87d

View File

@ -6,9 +6,10 @@
#include <stdlib.h>
void *malloc(size_t);
void free(void *);
void *memset(void *, int, size_t);
void *malloc(size_t) __attribute__((weak));
void free(void *) __attribute__((weak));
void *memset(void *, int, size_t) __attribute__((weak));
void *calloc(size_t nelem, size_t elsize) __attribute__((weak));
void *calloc(size_t nelem, size_t elsize) {
void *Result = malloc(nelem*elsize);