hp2FEM
0.1
|
Functions dealing with creating and allocating mcores. More...
#include <GKlib.h>
Functions | |
gk_mcore_t * | gk_mcoreCreate (size_t coresize) |
gk_mcore_t * | gk_gkmcoreCreate () |
void | gk_mcoreDestroy (gk_mcore_t **r_mcore, int showstats) |
void | gk_gkmcoreDestroy (gk_mcore_t **r_mcore, int showstats) |
void * | gk_mcoreMalloc (gk_mcore_t *mcore, size_t nbytes) |
void | gk_mcorePush (gk_mcore_t *mcore) |
void | gk_gkmcorePush (gk_mcore_t *mcore) |
void | gk_mcorePop (gk_mcore_t *mcore) |
void | gk_gkmcorePop (gk_mcore_t *mcore) |
void | gk_mcoreAdd (gk_mcore_t *mcore, int type, size_t nbytes, void *ptr) |
void | gk_gkmcoreAdd (gk_mcore_t *mcore, int type, size_t nbytes, void *ptr) |
void | gk_mcoreDel (gk_mcore_t *mcore, void *ptr) |
void | gk_gkmcoreDel (gk_mcore_t *mcore, void *ptr) |
Functions dealing with creating and allocating mcores.
void gk_gkmcoreAdd | ( | gk_mcore_t * | mcore, |
int | type, | ||
size_t | nbytes, | ||
void * | ptr | ||
) |
Adds a memory allocation at the end of the list. This is the gkmcore version.
This function creates an mcore. This version is used for gkmcore.
void gk_gkmcoreDel | ( | gk_mcore_t * | mcore, |
void * | ptr | ||
) |
This function deletes the mop associated with the supplied pointer. The mop has to be a heap allocation, otherwise it fails violently. This is the gkmcore version.
void gk_gkmcoreDestroy | ( | gk_mcore_t ** | r_mcore, |
int | showstats | ||
) |
This function destroys an mcore. This version is for gkmcore.
void gk_gkmcorePop | ( | gk_mcore_t * | mcore | ) |
This function frees all mops since the last push. This version is for poping the gkmcore and it uses free instead of gk_free.
void gk_gkmcorePush | ( | gk_mcore_t * | mcore | ) |
This function sets a marker in the stack of malloc ops to be used subsequently for freeing purposes. This is the gkmcore version.
void gk_mcoreAdd | ( | gk_mcore_t * | mcore, |
int | type, | ||
size_t | nbytes, | ||
void * | ptr | ||
) |
Adds a memory allocation at the end of the list.
gk_mcore_t* gk_mcoreCreate | ( | size_t | coresize | ) |
This function creates an mcore
void gk_mcoreDel | ( | gk_mcore_t * | mcore, |
void * | ptr | ||
) |
This function deletes the mop associated with the supplied pointer. The mop has to be a heap allocation, otherwise it fails violently.
void gk_mcoreDestroy | ( | gk_mcore_t ** | r_mcore, |
int | showstats | ||
) |
This function destroys an mcore.
void* gk_mcoreMalloc | ( | gk_mcore_t * | mcore, |
size_t | nbytes | ||
) |
This function allocate space from the core/heap
void gk_mcorePop | ( | gk_mcore_t * | mcore | ) |
This function frees all mops since the last push
void gk_mcorePush | ( | gk_mcore_t * | mcore | ) |
This function sets a marker in the stack of malloc ops to be used subsequently for freeing purposes