Bug #5901 » smaller-heap-for-openbsd.diff
| gc.c (working copy) | ||
|---|---|---|
|
}
|
||
|
#endif
|
||
|
#ifdef __OpenBSD__
|
||
|
/* OpenBSD posix_memalign() is broken. Quoting BUGS in manual:
|
||
|
* "Only alignments up to the page size can be specified."
|
||
|
* Minimal page size is 4KB. */
|
||
|
#define HEAP_ALIGN_LOG 12
|
||
|
#define HEAP_ALIGN 0x1000
|
||
|
#define HEAP_ALIGN_MASK 0x0fff
|
||
|
#else
|
||
|
/* tiny heap size: 16KB */
|
||
|
#define HEAP_ALIGN_LOG 14
|
||
|
#define HEAP_ALIGN 0x4000
|
||
|
#define HEAP_ALIGN_MASK 0x3fff
|
||
|
#endif
|
||
|
#define REQUIRED_SIZE_BY_MALLOC (sizeof(size_t) * 5)
|
||
|
#define HEAP_SIZE (HEAP_ALIGN - REQUIRED_SIZE_BY_MALLOC)
|
||