... | ... |
@@ -263,6 +263,7 @@ static inline void qm_detach_free(struct qm_block* qm, struct qm_frag* frag) |
263 | 263 |
} |
264 | 264 |
|
265 | 265 |
|
266 |
+ |
|
266 | 267 |
#ifdef DBG_QM_MALLOC |
267 | 268 |
static inline struct qm_frag* qm_find_free(struct qm_block* qm, |
268 | 269 |
unsigned int size, |
... | ... |
@@ -452,6 +453,9 @@ void qm_free(struct qm_block* qm, void* p) |
452 | 453 |
next=FRAG_NEXT(f); |
453 | 454 |
if (((char*)next < (char*)qm->last_frag_end) &&( next->u.is_free)){ |
454 | 455 |
/* join */ |
456 |
+#ifdef DBG_QM_MALLOC |
|
457 |
+ qm_debug_frag(qm, next); |
|
458 |
+#endif |
|
455 | 459 |
qm_detach_free(qm, next); |
456 | 460 |
size+=next->size+FRAG_OVERHEAD; |
457 | 461 |
qm->real_used-=FRAG_OVERHEAD; |
... | ... |
@@ -463,7 +467,7 @@ void qm_free(struct qm_block* qm, void* p) |
463 | 467 |
/* (struct qm_frag*)((char*)f - (struct qm_frag_end*)((char*)f- |
464 | 468 |
sizeof(struct qm_frag_end))->size);*/ |
465 | 469 |
#ifdef DBG_QM_MALLOC |
466 |
- qm_debug_frag(qm, f); |
|
470 |
+ qm_debug_frag(qm, prev); |
|
467 | 471 |
#endif |
468 | 472 |
if (prev->u.is_free){ |
469 | 473 |
/*join*/ |