SimGrid 3.6.2
Scalable simulation of distributed systems
|
Functions | |
void * | xbt_mallocator_get (xbt_mallocator_t mallocator) |
Extract an object from a mallocator. | |
void | xbt_mallocator_release (xbt_mallocator_t mallocator, void *object) |
Push an object into a mallocator. |
void* xbt_mallocator_get | ( | xbt_mallocator_t | m | ) |
Extract an object from a mallocator.
m | a mallocator |
Remove an object from the mallocator and return it. This function is designed to be used instead of malloc(). If the mallocator is not empty, an object is extracted from the mallocator and no malloc is done.
If the mallocator is empty, a new object is created, by calling the function new_f().
In both cases, the function reset_f() is called on the object.
void xbt_mallocator_release | ( | xbt_mallocator_t | m, |
void * | object | ||
) |
Push an object into a mallocator.
m | a mallocator |
object | an object you don't need anymore |
Push into the mallocator an object you don't need anymore. This function is designed to be used instead of free(). If the mallocator is not full, your object if stored into the mallocator and no free is done. If the mallocator is full, the object is freed by calling the function free_f().
Back to the main Simgrid Documentation page |
The version of Simgrid documented here is v3.6.2. Documentation of other versions can be found in their respective archive files (directory doc/html). |
Generated for SimGridAPI by
![]() |