Skip to content

Commit c696d20

Browse files
committed
wip: increase pool and arena sizes by 4x
1 parent 21c1679 commit c696d20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Objects/obmalloc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -907,8 +907,8 @@ static int running_on_valgrind = -1;
907907
* Arenas are allocated with mmap() on systems supporting anonymous memory
908908
* mappings to reduce heap fragmentation.
909909
*/
910-
#define ARENA_BITS 18
911-
#define ARENA_SIZE (1 << ARENA_BITS) /* 256 KiB */
910+
#define ARENA_BITS 20
911+
#define ARENA_SIZE (1 << ARENA_BITS) /* 1 MiB */
912912
#define ARENA_SIZE_MASK (ARENA_SIZE - 1)
913913

914914
#ifdef WITH_MEMORY_LIMITS
@@ -918,8 +918,8 @@ static int running_on_valgrind = -1;
918918
/*
919919
* Size of the pools used for small blocks. Must be a power of 2.
920920
*/
921-
#define POOL_BITS 12 /* 4 KiB */
922-
#define POOL_SIZE (1 << POOL_BITS) /* 4 KiB */
921+
#define POOL_BITS 14 /* 16 KiB */
922+
#define POOL_SIZE (1 << POOL_BITS)
923923
#define POOL_SIZE_MASK (POOL_SIZE - 1)
924924

925925
#define MAX_POOLS_IN_ARENA (ARENA_SIZE / POOL_SIZE)

0 commit comments

Comments
 (0)