sbrk.c raw

   1  #define _BSD_SOURCE
   2  #include <unistd.h>
   3  #include <stdint.h>
   4  #include <errno.h>
   5  #include "syscall.h"
   6  
   7  void *sbrk(intptr_t inc)
   8  {
   9  	if (inc) return (void *)__syscall_ret(-ENOMEM);
  10  	return (void *)__syscall(SYS_brk, 0);
  11  }
  12