mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Allow configuring TRANSIENT_HEAP_TOTAL_SIZE
Some platforms have memory resource limits, but theap's memory area is too large for such situations. So allow configuring the size at build-time.
This commit is contained in:
parent
0cefc2fbdf
commit
787daea6d2
Notes:
git
2021-12-10 17:15:38 +09:00
1 changed files with 2 additions and 0 deletions
|
@ -59,7 +59,9 @@
|
|||
|
||||
/* K M */
|
||||
#define TRANSIENT_HEAP_BLOCK_SIZE (1024 * 32 ) /* 32KB int16_t */
|
||||
#ifndef TRANSIENT_HEAP_TOTAL_SIZE
|
||||
#define TRANSIENT_HEAP_TOTAL_SIZE (1024 * 1024 * 32) /* 32 MB */
|
||||
#endif
|
||||
#define TRANSIENT_HEAP_ALLOC_MAX (1024 * 2 ) /* 2 KB */
|
||||
#define TRANSIENT_HEAP_BLOCK_NUM (TRANSIENT_HEAP_TOTAL_SIZE / TRANSIENT_HEAP_BLOCK_SIZE)
|
||||
#define TRANSIENT_HEAP_USABLE_SIZE (TRANSIENT_HEAP_BLOCK_SIZE - sizeof(struct transient_heap_block_header))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue