Browse Source

mem_reserved and mem_allocated are actually the same variable that needs to be tracked.

Ioannis Koutras 13 years ago
parent
commit
6deb92f82a
2 changed files with 2 additions and 3 deletions
  1. 1 2
      include/dmmlib/heap.h
  2. 1 1
      src/dmm_adaptor.c

+ 1 - 2
include/dmmlib/heap.h

@@ -57,8 +57,7 @@ typedef struct dmmstats_s {
 	uint32_t max_mem_requested; /**< Maximum total memory requested. */
 	uint32_t mem_allocated; /**< Total memory currently allocated. */
 	uint32_t mem_requested; /**< Total memory currently requested. */
-	uint32_t mem_reserved; /**< Total memory currently reserved. */
-	uint32_t live_objects; /**< Number of live objects. */
+	uint32_t live_objects; /**< Number of the currently used blocks. */
 	uint32_t read_mem_accesses; /**< Number of read accesses. */
 	uint32_t write_mem_accesses; /**< Number of write accesses. */
 	uint32_t num_malloc; /**< Number of malloc()'s served. */

+ 1 - 1
src/dmm_adaptor.c

@@ -80,7 +80,7 @@ float get_current_fragmentation(heap_t *heap) {
         (float)	heap->dmm_stats.mem_requested - 1.0;
 
     if(fragmentation <= MIN_FRAG_THRESHOLD &&
-            heap->dmm_stats.mem_reserved < heap->dmm_knobs.mem_threshold) {
+            heap->dmm_stats.mem_allocated < heap->dmm_knobs.mem_threshold) {
         heap->dmm_knobs.frag_state = 0;
         heap->dmm_knobs.foot_state = 0;
         update_frag_params(heap);