YAP 7.1.0
Stack Discipline Memory Allocation

memory who lives during a stack activation More...

Detailed Description

memory who lives during a stack activation

In other words, most often neds no free()

Macro Definition Documentation

◆ BaseMalloc

#define BaseMalloc (   sz)    MallocAtLevel(sz, 1)

Definition at line 200 of file alloc.h.

◆ MBYTE

#define MBYTE   (1024 * 1024)

Definition at line 204 of file alloc.h.

◆ pop_output_text_stack

#define pop_output_text_stack (   lvl,
 
)    pop_output_text_stack__(lvl,p PASS_REGS)

Definition at line 227 of file alloc.h.

◆ pop_text_stack

#define pop_text_stack (   lvl)    pop_text_stack__(lvl PASS_REGS)

Definition at line 226 of file alloc.h.

◆ push_text_stack

#define push_text_stack ( )    push_text_stack__(PASS_REGS1)

Definition at line 225 of file alloc.h.

Function Documentation

◆ AllocLevel()

int AllocLevel ( void  )

Definition at line 1666 of file alloc.c.

◆ Malloc()

void * Malloc ( size_t sz  USES_REGS)

allocate a temporary text block

Definition at line 1759 of file alloc.c.

◆ MallocAtLevel()

void * MallocAtLevel ( size_t  sz,
int atL  USES_REGS 
)

Definition at line 1774 of file alloc.c.

◆ push_text_stack__()

int push_text_stack__ ( USES_REGS1  )

Definition at line 1698 of file alloc.c.

◆ Realloc()

void * Realloc ( void *  buf,
size_t sz  USES_REGS 
)

Definition at line 1796 of file alloc.c.

Macros

#define BaseMalloc(sz)   MallocAtLevel(sz, 1)
 
#define MBYTE   (1024 * 1024)
 
#define push_text_stack()   push_text_stack__(PASS_REGS1)
 
#define pop_text_stack(lvl)   pop_text_stack__(lvl PASS_REGS)
 
#define pop_output_text_stack(lvl, p)   pop_output_text_stack__(lvl,p PASS_REGS)
 

Functions

void * Malloc (size_t sz USES_REGS)
 allocate a temporary text block More...
 
void * Realloc (void *buf, size_t sz USES_REGS)
 
void Free (void *buf USES_REGS)
 
void * MallocAtLevel (size_t sz, int atL USES_REGS)
 
const void * MallocExportAsRO (const void *blk)
 
int AllocLevel (void)
 
int push_text_stack__ (USES_REGS1)
 
int pop_text_stack__ (int lvl USES_REGS)
 
void * pop_output_text_stack__ (int lvl, const void *ox USES_REGS)