SU2
Functions
mcore.c File Reference

Functions dealing with creating and allocating mcores. More...

#include <GKlib.h>

Functions

gk_mcore_tgk_mcoreCreate (size_t coresize)
 
gk_mcore_tgk_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)
 

Detailed Description

Functions dealing with creating and allocating mcores.

Date
Started 5/30/11
Author
George
Copyright 1997-2011, Regents of the University of Minnesota
Version
Id
mcore.c 13953 2013-03-30 16:20:07Z karypis

Function Documentation

§ gk_gkmcoreAdd()

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.

§ gk_gkmcoreCreate()

gk_mcore_t* gk_gkmcoreCreate ( )

This function creates an mcore. This version is used for gkmcore.

§ gk_gkmcoreDel()

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.

§ gk_gkmcoreDestroy()

void gk_gkmcoreDestroy ( gk_mcore_t **  r_mcore,
int  showstats 
)

This function destroys an mcore. This version is for gkmcore.

§ gk_gkmcorePop()

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.

§ gk_gkmcorePush()

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.

§ gk_mcoreAdd()

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_mcoreCreate()

gk_mcore_t* gk_mcoreCreate ( size_t  coresize)

This function creates an mcore

§ gk_mcoreDel()

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.

§ gk_mcoreDestroy()

void gk_mcoreDestroy ( gk_mcore_t **  r_mcore,
int  showstats 
)

This function destroys an mcore.

§ gk_mcoreMalloc()

void* gk_mcoreMalloc ( gk_mcore_t mcore,
size_t  nbytes 
)

This function allocate space from the core/heap

§ gk_mcorePop()

void gk_mcorePop ( gk_mcore_t mcore)

This function frees all mops since the last push

§ gk_mcorePush()

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