Back to index

glibc  2.9
Functions | Variables
brk.c File Reference
#include <errno.h>
#include <unistd.h>
#include <sysdep.h>

Go to the source code of this file.

Functions

int __brk (void *addr)

Variables

void * __curbrk = 0

Function Documentation

int __brk ( void *  addr)

Definition at line 28 of file brk.c.

{
  unsigned char *newbrk;

  newbrk = (unsigned char *) INLINE_SYSCALL (brk, 1, addr);

  __curbrk = newbrk;

  if (newbrk < (unsigned char *) addr)
    {
      __set_errno (ENOMEM);
      return -1;
    }

  return 0;
}

Variable Documentation

void* __curbrk = 0

Definition at line 25 of file brk.c.