File: malloc.c

package info (click to toggle)
ink 0.5.3-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 560 kB
  • sloc: sh: 3,643; ansic: 227; makefile: 13
file content (16 lines) | stat: -rw-r--r-- 282 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <config.h>
#undef malloc
     
#include <sys/types.h>
#include <stdlib.h>
     
/* 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);
}