From bd17e1b3ae1b256a718ed09ad1673f5eb913467d Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Fri, 4 Apr 2014 14:29:00 +0100
Subject: [PATCH] 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.
---
 unix/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/unix/main.c b/unix/main.c
index 228c4746a..c3bd24cd9 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
-- 
GitLab