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
set size_used negative for free fragment/block
[simgrid.git]
/
src
/
xbt
/
mmalloc
/
mfree.c
diff --git
a/src/xbt/mmalloc/mfree.c
b/src/xbt/mmalloc/mfree.c
index
754ff30
..
cbdea22
100644
(file)
--- a/
src/xbt/mmalloc/mfree.c
+++ b/
src/xbt/mmalloc/mfree.c
@@
-153,12
+153,12
@@
void mfree(struct mdesc *mdp, void *ptr)
/* Set size used in the fragment to 0 */
frag_nb = RESIDUAL(ptr, BLOCKSIZE) >> type;
/* Set size used in the fragment to 0 */
frag_nb = RESIDUAL(ptr, BLOCKSIZE) >> type;
- if( mdp->heapinfo[block].busy_frag.frag_size[frag_nb] ==
0
){
+ if( mdp->heapinfo[block].busy_frag.frag_size[frag_nb] ==
-1
){
UNLOCK(mdp);
THROWF(system_error, 0, "Asked to free a fragment that is already free. I'm puzzled\n");
}
UNLOCK(mdp);
THROWF(system_error, 0, "Asked to free a fragment that is already free. I'm puzzled\n");
}
- mdp->heapinfo[block].busy_frag.frag_size[frag_nb] =
0
;
+ mdp->heapinfo[block].busy_frag.frag_size[frag_nb] =
-1
;
if (mdp->heapinfo[block].busy_frag.nfree ==
(BLOCKSIZE >> type) - 1) {
if (mdp->heapinfo[block].busy_frag.nfree ==
(BLOCKSIZE >> type) - 1) {