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
Mallocator on the message contextes
[simgrid.git]
/
src
/
gras
/
Msg
/
msg.c
diff --git
a/src/gras/Msg/msg.c
b/src/gras/Msg/msg.c
index
c669fbd
..
a041dba
100644
(file)
--- a/
src/gras/Msg/msg.c
+++ b/
src/gras/Msg/msg.c
@@
-79,6
+79,12
@@
void gras_msg_init(void) {
memcpy(_GRAS_header,"GRAS", 4);
_GRAS_header[4]=GRAS_PROTOCOL_VERSION;
_GRAS_header[5]=(char)GRAS_THISARCH;
memcpy(_GRAS_header,"GRAS", 4);
_GRAS_header[4]=GRAS_PROTOCOL_VERSION;
_GRAS_header[5]=(char)GRAS_THISARCH;
+
+ gras_msg_ctx_mallocator =
+ xbt_mallocator_new(1000,
+ gras_msg_ctx_mallocator_new_f,
+ gras_msg_ctx_mallocator_free_f,
+ gras_msg_ctx_mallocator_reset_f);
}
/*
}
/*
@@
-88,6
+94,8
@@
void
gras_msg_exit(void) {
VERB0("Exiting Msg");
xbt_set_free(&_gras_msgtype_set);
gras_msg_exit(void) {
VERB0("Exiting Msg");
xbt_set_free(&_gras_msgtype_set);
+
+ xbt_mallocator_free(gras_msg_ctx_mallocator);
}
/*
}
/*