diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-04 14:29:00 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-04 14:29:00 +0100 |
commit | bd17e1b3ae1b256a718ed09ad1673f5eb913467d (patch) | |
tree | 6c152ce1565affefe57aaee37ee6cff2114d5a13 | |
parent | 9b1599c66399737496f7f4deaf495ad2dafdc0a1 (diff) | |
download | micropython-bd17e1b3ae1b256a718ed09ad1673f5eb913467d.tar.gz micropython-bd17e1b3ae1b256a718ed09ad1673f5eb913467d.zip |
unix: Allocate more heap memory by default on 64 bit machines.
Pointers are 2x bigger on 64 bit machines, so we should allocate twice
the memory to have a comparable heap size.
-rw-r--r-- | unix/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/unix/main.c b/unix/main.c index 228c4746a5..c3bd24cd98 100644 --- a/unix/main.c +++ b/unix/main.c @@ -30,7 +30,8 @@ #if MICROPY_ENABLE_GC // Heap size of GC heap (if enabled) -long heap_size = 128*1024; +// Make it larger on a 64 bit machine, because pointers are larger. +long heap_size = 128*1024 * (sizeof(machine_uint_t) / 4); #endif // Stack top at the start of program |