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

 weak_alias (__curbrk, ___brk_addr)

Variables

void * __curbrk = 0

Function Documentation

weak_alias ( __curbrk  ,
___brk_addr   
)

Definition at line 31 of file brk.c.

{
  void *newbrk;

  {
    register void *o0 __asm__("%o0") = addr;
    register int g1 __asm__("%g1") = __NR_brk;
    __asm ("t 0x10" : "=r"(o0) : "r"(g1), "0"(o0) : "cc");
    newbrk = o0;
  }

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