Multi-ApplicationOnlineProfiling
2.1
|
Not to be used directly. More...
Data Structures | |
struct | Buffered_LIFO_chunk |
Structure defining a chunk of LIFO. A buffered lifo consists in several chunks which are stacked in a lifo fashion. Moreover those chunks gather several elems in order to avoid alocation and dealocation plus it reduces the pointer versus data ratio for small amount of data. More... | |
Functions | |
struct Buffered_LIFO_chunk * | Buffered_LIFO_chunk_new (size_t sizeof_payload, uint64_t chunk_size, struct Buffered_LIFO_chunk *prev) |
Allocates an empty Buffered_LIFO_chunk pointing to prev. More... | |
void | Buffered_LIFO_chunk_release (struct Buffered_LIFO_chunk *chunk, size_t sizeof_payload, void(*free_func)(void *)) |
Releases a Buffered_LIFO_chunk note that it does not recurses over previous chunks. More... | |
struct Buffered_LIFO_chunk * | Buffered_LIFO_chunk_push (struct Buffered_LIFO_chunk *chunk, void *elem, size_t sizeof_payload, uint64_t chunk_size) |
Push a new elem in the Buffered_LIFO_chunk. More... | |
struct Buffered_LIFO_chunk * | Buffered_LIFO_chunk_pop (struct Buffered_LIFO_chunk *chunk, size_t sizeof_payload, uint64_t chunk_size, void *elem, int *did_ret) |
Get an element from the Buffered_LIFO_chunk. More... | |
void * | Buffered_LIFO_chunk_head (struct Buffered_LIFO_chunk *chunk, size_t sizeof_payload) |
Get a pointer to the Buffered_LIFO_chunk head eleme (NULL if none) More... | |
Not to be used directly.
These structure and functions are not meant to be used directly. These are internals of Buffered LIFO and related functions.
void* Buffered_LIFO_chunk_head | ( | struct Buffered_LIFO_chunk * | chunk, |
size_t | sizeof_payload | ||
) |
Get a pointer to the Buffered_LIFO_chunk head eleme (NULL if none)
chunk | Chunk from which we want to get the head |
Definition at line 117 of file Buffered_LIFO.c.
struct Buffered_LIFO_chunk* Buffered_LIFO_chunk_new | ( | size_t | sizeof_payload, |
uint64_t | chunk_size, | ||
struct Buffered_LIFO_chunk * | prev | ||
) |
Allocates an empty Buffered_LIFO_chunk pointing to prev.
sizeof_payload | size of a payload element to compute piggy backing stored in the LIFO to gain space |
chunk_size | the number of elements the chunk can contain |
prev | pointer to the previous Buffered_LIFO_chunk in order to chain them |
Definition at line 23 of file Buffered_LIFO.c.
struct Buffered_LIFO_chunk* Buffered_LIFO_chunk_pop | ( | struct Buffered_LIFO_chunk * | chunk, |
size_t | sizeof_payload, | ||
uint64_t | chunk_size, | ||
void * | elem, | ||
int * | did_ret | ||
) |
Get an element from the Buffered_LIFO_chunk.
chunk | Chunk to which we want to add an elem (can be NULL and then leads to did_ret == 0 ) |
sizeof_payload | size of a payload element |
chunk_size | the number of elements the chunk can contain |
did_ret | boolean which allows us to know if we actually retrieved an elem from the LIFO |
Definition at line 88 of file Buffered_LIFO.c.
struct Buffered_LIFO_chunk* Buffered_LIFO_chunk_push | ( | struct Buffered_LIFO_chunk * | chunk, |
void * | elem, | ||
size_t | sizeof_payload, | ||
uint64_t | chunk_size | ||
) |
Push a new elem in the Buffered_LIFO_chunk.
chunk | Chunk to which we want to add an elem (can be NULL and then leads to a chunk allocation) |
sizeof_payload | size of a payload element |
chunk_size | the number of elements the chunk can contain |
Definition at line 62 of file Buffered_LIFO.c.
void Buffered_LIFO_chunk_release | ( | struct Buffered_LIFO_chunk * | chunk, |
size_t | sizeof_payload, | ||
void(*)(void *) | free_func | ||
) |
Releases a Buffered_LIFO_chunk note that it does not recurses over previous chunks.
chunk | Chunk to be released |
sizeof_payload | size of a payload element |
free_func | a function to be called over each elem still present in the FIFO (NULL if node) |
Definition at line 39 of file Buffered_LIFO.c.