diff options
Diffstat (limited to 'lib/malloc.c')
-rwxr-xr-x | lib/malloc.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/malloc.c b/lib/malloc.c new file mode 100755 index 0000000..d4c605f --- /dev/null +++ b/lib/malloc.c @@ -0,0 +1,17 @@ + #include <config.h>
+ #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);
+ }
|