[前][次][番号順一覧][スレッド一覧]

ruby-changes:70141

From: Yuta <ko1@a...>
Date: Fri, 10 Dec 2021 17:15:33 +0900 (JST)
Subject: [ruby-changes:70141] 787daea6d2 (master): Allow configuring TRANSIENT_HEAP_TOTAL_SIZE

https://git.ruby-lang.org/ruby.git/commit/?id=787daea6d2

From 787daea6d2199c34d951aa3de0f3048829a8ea13 Mon Sep 17 00:00:00 2001
From: Yuta Saito <kateinoigakukun@g...>
Date: Mon, 6 Dec 2021 11:26:05 +0900
Subject: 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.
---
 transient_heap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/transient_heap.c b/transient_heap.c
index d2cf8e4bd94..c14cf146135 100644
--- a/transient_heap.c
+++ b/transient_heap.c
@@ -59,7 +59,9 @@ https://github.com/ruby/ruby/blob/trunk/transient_heap.c#L59
 
                                           /*  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))
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]