diff options
Diffstat (limited to 'Build/source/utils/mtx/malloc')
-rw-r--r-- | Build/source/utils/mtx/malloc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Build/source/utils/mtx/malloc b/Build/source/utils/mtx/malloc new file mode 100644 index 00000000000..90a643256eb --- /dev/null +++ b/Build/source/utils/mtx/malloc @@ -0,0 +1,16 @@ +#undef malloc + +#include <sys/types.h> + +void *malloc (); + +/* Allocate an N-byte block of memory from the heap. + If N is zero, allocate a 1-byte block. */ + +void * +rpl_malloc (size_t n) +{ + if (n == 0) + n = 1; + return malloc (n); +} |