diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-04-21 22:27:33 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-04-21 22:27:33 +0900 |
| commit | 00770e2d3d72423f1a5bde0f7d575d50a5a34f43 (patch) | |
| tree | 9954a493b6d33863197fa76b629964331d04900d /src | |
| parent | 02df2539dfa0f1ad4b4b3c0f02260c5256bee8fa (diff) | |
| parent | b2dc04393adaa09b6ff91e4d31b72e0ba6621a53 (diff) | |
| download | mruby-00770e2d3d72423f1a5bde0f7d575d50a5a34f43.tar.gz mruby-00770e2d3d72423f1a5bde0f7d575d50a5a34f43.zip | |
Merge pull request #3625 from take-cheeze/pool_64bit
Align pool allocator with 8 byte in 64-bit environment.
Diffstat (limited to 'src')
| -rw-r--r-- | src/pool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pool.c b/src/pool.c index 18f66fc27..db4546abf 100644 --- a/src/pool.c +++ b/src/pool.c @@ -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 |
