Data Structures | Defines

f_malloc.h File Reference

Simple, very fast, malloc library. More...

#include "meminfo.h"
Include dependency graph for f_malloc.h:

Go to the source code of this file.

Data Structures

Defines

Hash structure

- 0 ....

F_MALLOC_OPTIMIZE/ROUNDTO - small buckets, size increases with ROUNDTO from bucket to bucket


Detailed Description

Definition in file f_malloc.h.


Define Documentation

#define fm_sums (   qm  )     do{}while(0)
Parameters:
qm memory block

Definition at line 222 of file f_malloc.h.


Function Documentation

unsigned long fm_available ( struct fm_block qm  ) 
Parameters:
qm memory block
Returns:
Returns how much free memory is available, on error (not compiled with bookkeeping code) returns (unsigned long)(-1)
void fm_free ( struct fm_block qm,
void *  p 
)

Main memory manager free function, provide functionality necessary for pkg_free

Parameters:
qm memory block
p freed memory
void fm_info ( struct fm_block qm,
struct mem_info info 
)

Fills a malloc info structure with info about the block, if a parameter is not supported, it will be filled with 0

Parameters:
qm memory block
info memory information
void* fm_malloc ( struct fm_block qm,
unsigned long  size 
)
Parameters:
qm memory block
size memory allocation size
Returns:
address of allocated memory
struct fm_block* fm_malloc_init ( char *  address,
unsigned long  size 
) [read]
Parameters:
address start address for memory block
size Size of allocation
Returns:
return the fm_block

Referenced by init_pkg_mallocs().

Here is the caller graph for this function:

void* fm_realloc ( struct fm_block qm,
void *  p,
unsigned long  size 
)

Main memory manager realloc function, provide functionality for pkg_realloc

Parameters:
qm memory block
p reallocated memory block
size 
Returns:
reallocated memory block
void fm_status ( struct fm_block qm  ) 
Parameters:
qm memory block