From 0394d18644bda0bcaed42501214c205dc6579a02 Mon Sep 17 00:00:00 2001 From: Matthew Mondor Date: Sun, 30 Aug 2015 02:14:57 -0400 Subject: [PATCH] - Use FIXNUM_BITS rather than ECL_FIXNUM_BITS which was undefined (the old code was bogus too on that respect) - To prevent 32-bit rounding append L to the default heap size definitions - Also print the fixnum bit size and default heap in the debug log --- src/c/main.d | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/c/main.d b/src/c/main.d index 867aaf9..c121515 100755 --- a/src/c/main.d +++ b/src/c/main.d @@ -66,10 +66,12 @@ const char *ecl_self; /* HEAP */ -#if ECL_FIXNUM_BITS <= 32 -#define HEAP_SIZE_DEFAULT (1024 * 1024 * 1024) +#if FIXNUM_BITS <= 32 +/* 1GB */ +#define HEAP_SIZE_DEFAULT 1073741824L #else -#define HEAP_SIZE_DEFAULT (4096 * 1024 * 1024) +/* 4GB */ +#define HEAP_SIZE_DEFAULT 4294967296L #endif /* XXX Could eventually be conditional on a DEBUG definition if kept */ @@ -101,6 +103,8 @@ w(const char *fmt, ...) size_t fix_heap_size(size_t target) { + w("FIXNUM_BITS = %d", FIXNUM_BITS); + w("HEAP_SIZE_DEFAULT = %zd", HEAP_SIZE_DEFAULT); w("Entering fix_heap_size(%zd)", target); #if defined(HAVE_SYS_RESOURCE_H) && defined(RLIMIT_DATA) -- 2.9.0