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 30 of file brk.c.

{
  void *newbrk;

  newbrk = INLINE_SYSCALL (brk, 1, __ptrvalue (addr));

  __curbrk = newbrk;

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

  return 0;
}

Variable Documentation

void* __curbrk = 0

Definition at line 27 of file brk.c.