Skip to content

Commit

Permalink
FEAT: Optimize memory usage by avoiding power-of-2 rounding when resi…
Browse files Browse the repository at this point in the history
…zing large series
  • Loading branch information
Oldes committed Jan 31, 2025
1 parent 7db98cd commit 96b13b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/m-pools.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ FORCE_INLINE
if (powerof2) {
U32_ROUND_UP_POWER_OF_2(length);
} else
length = ALIGN(length, 2048);
length = ALIGN(length, 1024);
#ifdef DEBUGGING
Debug_Num("Alloc2:", length);
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/core/m-series.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
Trap0(RE_PAST_END);
}

newser = Make_Series(new_size, wide, TRUE);
newser = Make_Series(new_size, wide, new_size < 512*1024);
// If necessary, add series to the recently expanded list:
if (Prior_Expand[n] != series) {
n = (REBUPT)(Prior_Expand[0]) + 1;
Expand Down

0 comments on commit 96b13b8

Please sign in to comment.