mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
On 64bit macOS, enlarge heap pages to reduce mmap calls [Bug #18447]
This commit is contained in:
parent
239e71c0af
commit
002fa28599
Notes:
git
2021-12-29 20:54:12 +09:00
1 changed files with 7 additions and 0 deletions
7
gc.c
7
gc.c
|
@ -847,8 +847,15 @@ typedef struct rb_objspace {
|
|||
} rb_objspace_t;
|
||||
|
||||
|
||||
#if defined(__APPLE__) && defined(__LP64__) && !defined(HEAP_PAGE_ALIGN_LOG)
|
||||
/* for slow mmap: 64KiB */
|
||||
#define HEAP_PAGE_ALIGN_LOG 16
|
||||
#endif
|
||||
|
||||
#ifndef HEAP_PAGE_ALIGN_LOG
|
||||
/* default tiny heap size: 16KB */
|
||||
#define HEAP_PAGE_ALIGN_LOG 14
|
||||
#endif
|
||||
#define CEILDIV(i, mod) (((i) + (mod) - 1)/(mod))
|
||||
enum {
|
||||
HEAP_PAGE_ALIGN = (1UL << HEAP_PAGE_ALIGN_LOG),
|
||||
|
|
Loading…
Add table
Reference in a new issue