fehQlibs 26
Qlibs
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
alloc.c File Reference

Generic allocation of heap memory. More...

#include <stdlib.h>
#include <errno.h>
#include <limits.h>
#include "byte.h"
#include "alloc.h"
Include dependency graph for alloc.c:

Go to the source code of this file.

Data Structures

union  aligned
 

Macros

#define ALIGNMENT   16 /* XXX: assuming that this alignment is enough */
 
#define SPACE   4096 /* must be multiple of ALIGNMENT */
 
#define space   ((char *)realspace)
 

Functions

void * alloc (unsigned int n)
 
void alloc_free (void *x)
 
int alloc_re (void **x, unsigned int m, unsigned int n)
 

Detailed Description

Generic allocation of heap memory.

Authors
djb, feh, jmh qmail

Definition in file alloc.c.

Macro Definition Documentation

◆ ALIGNMENT

#define ALIGNMENT   16 /* XXX: assuming that this alignment is enough */

Definition at line 7 of file alloc.c.

◆ SPACE

#define SPACE   4096 /* must be multiple of ALIGNMENT */

Definition at line 8 of file alloc.c.

◆ space

#define space   ((char *)realspace)

Definition at line 9 of file alloc.c.

Function Documentation

◆ alloc()

void * alloc ( unsigned int  n)

Definition at line 27 of file alloc.c.

Here is the caller graph for this function:

◆ alloc_free()

void alloc_free ( void *  x)

Definition at line 45 of file alloc.c.

Here is the caller graph for this function:

◆ alloc_re()

int alloc_re ( void **  x,
unsigned int  m,
unsigned int  n 
)

Definition at line 53 of file alloc.c.

Here is the call graph for this function:
Here is the caller graph for this function: