-static void* SIMIX_synchro_mallocator_new_f(void) {
- smx_synchro_t synchro = xbt_new(s_smx_synchro_t, 1);
- synchro->simcalls = xbt_fifo_new();
- return synchro;
-}
-
-static void SIMIX_synchro_mallocator_free_f(void* synchro) {
- xbt_fifo_free(((smx_synchro_t) synchro)->simcalls);
- xbt_free(synchro);
-}
-
-static void SIMIX_synchro_mallocator_reset_f(void* synchro) {
-
- // we also recycle the simcall list
- xbt_fifo_t fifo = ((smx_synchro_t) synchro)->simcalls;
- xbt_fifo_reset(fifo);
- memset(synchro, 0, sizeof(s_smx_synchro_t));
- ((smx_synchro_t) synchro)->simcalls = fifo;
-}
-