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
Handle action whose latency is 0.
[simgrid.git]
/
src
/
xbt
/
mallocator.c
diff --git
a/src/xbt/mallocator.c
b/src/xbt/mallocator.c
index
5f16196
..
fcf4bc2
100644
(file)
--- a/
src/xbt/mallocator.c
+++ b/
src/xbt/mallocator.c
@@
-65,7
+65,7
@@
void xbt_mallocator_free(xbt_mallocator_t m) {
for (i = 0; i < m->current_size; i++) {
for (i = 0; i < m->current_size; i++) {
-
m->free_f
(m->objects[i]);
+
(*(m->free_f))
(m->objects[i]);
}
xbt_free(m->objects);
xbt_free(m);
}
xbt_free(m->objects);
xbt_free(m);
@@
-88,8
+88,7
@@
void xbt_mallocator_free(xbt_mallocator_t m) {
* \see xbt_mallocator_release()
*/
void *xbt_mallocator_get(xbt_mallocator_t m) {
* \see xbt_mallocator_release()
*/
void *xbt_mallocator_get(xbt_mallocator_t m) {
-
-void *object;
+ void *object;
xbt_assert0(m != NULL, "Invalid parameter");
xbt_assert0(m != NULL, "Invalid parameter");
@@
-99,9
+98,9
@@
void *object;
}
else {
/* otherwise we must allocate a new object */
}
else {
/* otherwise we must allocate a new object */
- object =
m->new_f
();
+ object =
(*(m->new_f))
();
}
}
-
m->reset_f
(object);
+
(*(m->reset_f))
(object);
return object;
}
return object;
}
@@
-127,6
+126,6
@@
void xbt_mallocator_release(xbt_mallocator_t m, void *object) {
}
else {
/* otherwise we don't have a choice, we must free the object */
}
else {
/* otherwise we don't have a choice, we must free the object */
-
m->free_f
(object);
+
(*(m->free_f))
(object);
}
}
}
}