Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,12 @@ static char fence_top[FENCE_TOP_SIZE];
static int bit_sizes[BASIC_BLOCK]; /* number bits for div-blocks*/

/* memory tables */
#if MEMORY_TABLE_TOP_LOG
static mem_table_t mem_table_alloc;
static mem_entry_t mem_table_alloc_entries[MEM_ALLOC_ENTRIES];
#endif
static mem_table_t mem_table_changed;
static mem_entry_t mem_table_changed_entries[MEM_ALLOC_ENTRIES];
static mem_entry_t mem_table_changed_entries[MEM_CHANGED_ENTRIES];

/* memory stats */
static unsigned long alloc_current = 0; /* current memory usage */
Expand Down Expand Up @@ -1771,12 +1773,11 @@ int _dmalloc_chunk_startup(void)
skip_free_list->sa_flags = ALLOC_FLAG_ADMIN;
skip_address_list->sa_flags = ALLOC_FLAG_ADMIN;

#if MEMORY_TABLE_TOP_LOG
_dmalloc_table_init(&mem_table_alloc, mem_table_alloc_entries,
sizeof(mem_table_alloc_entries) /
sizeof(*mem_table_alloc_entries));
_dmalloc_table_init(&mem_table_changed, mem_table_changed_entries,
sizeof(mem_table_changed_entries) /
sizeof(*mem_table_changed_entries));
#endif

return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion chunk_loc.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#define MAX_SKIP_LEVEL 32

/* memory table settings */
#define MEM_ALLOC_ENTRIES (MEMORY_TABLE_SIZE * 2)
#define MEM_ALLOC_ENTRIES (MEMORY_TABLE_TOP_LOG * 2)
#define MEM_CHANGED_ENTRIES (MEMORY_TABLE_SIZE * 2)

/* NOTE: FENCE_BOTTOM_SIZE and FENCE_TOP_SIZE defined in settings.h */
Expand Down