|
@@ -29,6 +29,7 @@
|
|
|
#include "trace.h"
|
|
|
|
|
|
#ifdef WITH_ALLOCATOR_STATS
|
|
|
+#include "locks.h"
|
|
|
#include "statistics.h"
|
|
|
#include "dmmlib/dmmlib.h"
|
|
|
#endif /* WITH_ALLOCATOR_STATS */
|
|
@@ -72,12 +73,14 @@ void bitmap_free(bitmap_rb_t *raw_block, void *ptr) {
|
|
|
}
|
|
|
|
|
|
#ifdef WITH_ALLOCATOR_STATS
|
|
|
- update_stats(&systemallocator.dmm_stats,
|
|
|
- FREE,
|
|
|
+ lock_global();
|
|
|
+ update_stats(&systemallocator.dmm_stats,
|
|
|
+ FREE,
|
|
|
#ifdef REQUEST_SIZE_INFO
|
|
|
- chunk_header->requested_size,
|
|
|
+ chunk_header->requested_size,
|
|
|
#endif /* REQUEST_SIZE_INFO */
|
|
|
- cells_used * raw_block->bytes_per_cell);
|
|
|
+ cells_used * raw_block->bytes_per_cell);
|
|
|
+ unlock_global();
|
|
|
#endif /* WITH_ALLOCATOR_STATS */
|
|
|
|
|
|
}
|