We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 729201d commit b6e7d3aCopy full SHA for b6e7d3a
src/core/m-pools.c
@@ -393,13 +393,17 @@ const REBPOOLSPEC Mem_Pool_Spec[MAX_POOLS] =
393
memset(node, 0, length);
394
} else {
395
if (powerof2) {
396
- // !!! WHO added this and why??? Just use a left shift and mask!
397
- REBCNT len=2048;
398
- while(len<length)
399
- len*=2;
400
- length=len;
401
- } else
402
- length = ALIGN(length, 2048);
+ REBCNT len=1;
+ if (!always_malloc) {
+ len = 2048;
+ }
+ // !!! WHO added this and why??? Just use a left shift and mask!
+ while(len<length)
+ len*=2;
403
+ length=len;
404
+ } else if (!always_malloc) {
405
+ length = ALIGN(length, 2048);
406
407
#ifdef DEBUGGING
408
Debug_Num("Alloc2:", length);
409
#endif
0 commit comments