Skip to content

Commit

Permalink
Changed customme block resize to lower the number of realloc
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Dec 21, 2024
1 parent 945b419 commit 5ad2f15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/custommem.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ void* internal_customMalloc(size_t size, int is32bits)
// add a new block
int i = n_blocks++;
if(n_blocks>c_blocks) {
c_blocks += 4;
c_blocks += box64_is32bits?8:256;
p_blocks = (blocklist_t*)box_realloc(p_blocks, c_blocks*sizeof(blocklist_t));
}
size_t allocsize = (fullsize>MMAPSIZE)?fullsize:MMAPSIZE;
Expand Down

0 comments on commit 5ad2f15

Please sign in to comment.