mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #3625 from take-cheeze/pool_64bit
Align pool allocator with 8 byte in 64-bit environment.
This commit is contained in:
@@ -13,8 +13,12 @@
|
||||
/* allocated memory address should be multiple of POOL_ALIGNMENT */
|
||||
/* or undef it if alignment does not matter */
|
||||
#ifndef POOL_ALIGNMENT
|
||||
#if INTPTR_MAX == INT64_MAX
|
||||
#define POOL_ALIGNMENT 8
|
||||
#else
|
||||
#define POOL_ALIGNMENT 4
|
||||
#endif
|
||||
#endif
|
||||
/* page size of memory pool */
|
||||
#ifndef POOL_PAGE_SIZE
|
||||
#define POOL_PAGE_SIZE 16000
|
||||
|
||||
Reference in New Issue
Block a user