A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Define a struct s_xbt_het_dictelm for holding the free function of a dict element.
[simgrid.git]
/
src
/
xbt
/
dict.c
diff --git
a/src/xbt/dict.c
b/src/xbt/dict.c
index
e678a99
..
2bbf177
100644
(file)
--- a/
src/xbt/dict.c
+++ b/
src/xbt/dict.c
@@
-671,12
+671,17
@@
void xbt_dict_preinit(void)
if (dict_elm_mallocator != NULL) {
/* Already created. I guess we want to switch to MC mode, so kill the previously created mallocator */
xbt_mallocator_free(dict_elm_mallocator);
if (dict_elm_mallocator != NULL) {
/* Already created. I guess we want to switch to MC mode, so kill the previously created mallocator */
xbt_mallocator_free(dict_elm_mallocator);
+ xbt_mallocator_free(dict_het_elm_mallocator);
}
dict_elm_mallocator = xbt_mallocator_new(256,
dict_elm_mallocator_new_f,
dict_elm_mallocator_free_f,
dict_elm_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);
+ dict_het_elm_mallocator = xbt_mallocator_new(256,
+ dict_het_elm_mallocator_new_f,
+ dict_het_elm_mallocator_free_f,
+ dict_het_elm_mallocator_reset_f);
}
/**
}
/**
@@
-688,6
+693,8
@@
void xbt_dict_postexit(void)
if (dict_elm_mallocator != NULL) {
xbt_mallocator_free(dict_elm_mallocator);
dict_elm_mallocator = NULL;
if (dict_elm_mallocator != NULL) {
xbt_mallocator_free(dict_elm_mallocator);
dict_elm_mallocator = NULL;
+ xbt_mallocator_free(dict_het_elm_mallocator);
+ dict_het_elm_mallocator = NULL;
}
if (all_sizes) {
unsigned int count;
}
if (all_sizes) {
unsigned int count;