Back to index

glibc  2.9
Functions | Variables
brk.c File Reference
#include <stdlib.h>

Go to the source code of this file.

Functions

int __brk (void *inaddr)
void __NONE_set_memvals (int argc, char **argv, char **envp)

Variables

void * __curbrk
void * __rorig
void * __rlimit
void * __C_heap_start
int __C_heap_size

Function Documentation

int __brk ( void *  inaddr)

Definition at line 28 of file brk.c.

{

  if ( ( (void *)inaddr > (void *)__rlimit ) ||
                        ( (void *)inaddr < (void *)__rorig ) )
    return -1;

  __curbrk = inaddr;
  return 0;
}
void __NONE_set_memvals ( int  argc,
char **  argv,
char **  envp 
)

Definition at line 49 of file brk.c.

{

  __rorig  =
  __curbrk = __C_heap_start;
  __rlimit = __curbrk + __C_heap_size;

  (void) &__NONE_set_memvals;    /* Avoid "defined but not used" warning.  */
}

Variable Documentation

Definition at line 43 of file brk.c.

Definition at line 42 of file brk.c.

void* __curbrk

Definition at line 23 of file brk.c.

void* __rlimit

Definition at line 25 of file brk.c.

void* __rorig

Definition at line 24 of file brk.c.