+/**
+ * Create the dict mallocators.
+ * This is an internal XBT function called during the lib initialization.
+ * It can be used several times to recreate the mallocator, for example when you switch to MC mode
+ */
+void xbt_dict_preinit(void) {
+ if (dict_mallocator != NULL) {
+ /* Already created. I guess we want to switch to MC mode, so kill the previously created mallocator */
+ xbt_mallocator_free(dict_mallocator);
+ xbt_mallocator_free(dict_elm_mallocator);
+ }
+
+ dict_mallocator = xbt_mallocator_new(256,
+ dict_mallocator_new_f,
+ dict_mallocator_free_f,
+ dict_mallocator_reset_f);
+ dict_elm_mallocator = xbt_mallocator_new(256,
+ dict_elm_mallocator_new_f,
+ dict_elm_mallocator_free_f,
+ dict_elm_mallocator_reset_f);
+}
+