diff --git a/unix/main.c b/unix/main.c
index 228c4746a57dc1839a7c9bae6c82663ac9f3f2b4..c3bd24cd9814ca0780986dd4c50932d4695aee5d 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