Back to index

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

Go to the source code of this file.

Functions

 weak_alias (__curbrk, ___brk_addr)

Variables

void * __curbrk = 0

Function Documentation

weak_alias ( __curbrk  ,
___brk_addr   
)

Definition at line 32 of file brk.c.

{
  void *__unbounded newbrk;

  INTERNAL_SYSCALL_DECL (err);
  newbrk = (void *__unbounded) INTERNAL_SYSCALL (brk, err, 1,
                                           __ptrvalue (addr));

  __curbrk = newbrk;

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

  return 0;
}

Here is the call graph for this function:


Variable Documentation

void* __curbrk = 0

Definition at line 27 of file brk.c.