[Gc] Fwd: [ivmai/bdwgc] MAX_HEAP_SECTS too little? (#143)
(too old to reply)
Ivan Maidanski
2017-02-02 18:29:27 UTC
Raw Message
Forwarded to BDWGC ML

From: Thomas Linder Puls <***@github.com>
To: ivmai/bdwgc <***@noreply.github.com>
CC: Subscribed <***@noreply.github.com>
Date: Thu, 2 Feb 2017, 19:14 +03:00
Subj: [ivmai/bdwgc] MAX_HEAP_SECTS too little? (#143)

If I create a program that tries to exhaust the memory then it dies with the "Too many heap sections", rather than a heap exhaustion.
We have defined LARGE_CONFIG and for 64bit platform the comment says that it should give an overflow at "roughly 128 GB":
# if CPP_WORDSZ > 32
# define MAX_HEAP_SECTS 8192 /* overflows at roughly 128 GB */
# else
# define MAX_HEAP_SECTS 768 /* Separately added heap sections. */
# endif
# elif defined(SMALL_CONFIG) && !defined(USE_PROC_FOR_LIBRARIES)
The HBLKSIZE is 4KB and each heap section will contain between 64 (MINHINCR) and 4096 (MAXHINCR) heap blocks.
As far as I can see this means that the "overflow" will occur at some point between 2 GB and 128 GB.
I can of course set the MAX_HEAP_SECTS larger myself, but isn't this a general problem that everybody will have to address.
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub , or mute the thread .