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
I don't need an extra file just to define calloc when it can be inlined that easily
[simgrid.git]
/
src
/
xbt
/
mmalloc
/
mm_legacy.c
diff --git
a/src/xbt/mmalloc/mm_legacy.c
b/src/xbt/mmalloc/mm_legacy.c
index
b353835
..
02e04b6
100644
(file)
--- a/
src/xbt/mmalloc/mm_legacy.c
+++ b/
src/xbt/mmalloc/mm_legacy.c
@@
-49,8
+49,10
@@
void *calloc(size_t nmemb, size_t size)
xbt_mheap_t mdp = __mmalloc_current_heap ?: (xbt_mheap_t) mmalloc_preinit();
LOCK(mdp);
- void *ret = m
calloc(mdp, nmemb,
size);
+ void *ret = m
malloc(mdp, nmemb*
size);
UNLOCK(mdp);
+ memset(ret, 0, nmemb * size);
+
return ret;
}