|
@@ -51,6 +51,7 @@ typedef struct maptable_node_s {
|
|
maptable. */
|
|
maptable. */
|
|
} maptable_node_t;
|
|
} maptable_node_t;
|
|
|
|
|
|
|
|
+#ifdef WITH_STATS
|
|
/** Statistics data structure. */
|
|
/** Statistics data structure. */
|
|
typedef struct dmmstats_s {
|
|
typedef struct dmmstats_s {
|
|
size_t max_mem_allocated; /**< Maximum total memory allocated. */
|
|
size_t max_mem_allocated; /**< Maximum total memory allocated. */
|
|
@@ -63,6 +64,7 @@ typedef struct dmmstats_s {
|
|
uint32_t num_malloc; /**< Number of malloc()'s served. */
|
|
uint32_t num_malloc; /**< Number of malloc()'s served. */
|
|
uint32_t num_free; /**< Number of free()'s served. */
|
|
uint32_t num_free; /**< Number of free()'s served. */
|
|
} dmmstats_t;
|
|
} dmmstats_t;
|
|
|
|
+#endif /* WITH_STATS */
|
|
|
|
|
|
#ifdef WITH_KNOBS
|
|
#ifdef WITH_KNOBS
|
|
/** A structure to represent tunable parameters of a heap */
|
|
/** A structure to represent tunable parameters of a heap */
|
|
@@ -94,7 +96,9 @@ typedef struct heap_s {
|
|
void *used_blocks_head; /**< The head of the used blocks list. */
|
|
void *used_blocks_head; /**< The head of the used blocks list. */
|
|
void *rov_ptr; /**< Roving pointer. */
|
|
void *rov_ptr; /**< Roving pointer. */
|
|
uint64_t num_objects; /**< Number of objects in the heap. */
|
|
uint64_t num_objects; /**< Number of objects in the heap. */
|
|
|
|
+#ifdef WITH_STATS
|
|
dmmstats_t dmm_stats; /**< Statistics of the heap. */
|
|
dmmstats_t dmm_stats; /**< Statistics of the heap. */
|
|
|
|
+#endif /* WITH_STATS */
|
|
#ifdef WITH_KNOBS
|
|
#ifdef WITH_KNOBS
|
|
dmmknobs_t dmm_knobs; /**< Tunable parameters of the heap. */
|
|
dmmknobs_t dmm_knobs; /**< Tunable parameters of the heap. */
|
|
#endif /* WITH_KNOBS */
|
|
#endif /* WITH_KNOBS */
|