unix: use conservative GC by default

This commit does two things:

 1. It makes it possible to grow the heap on Linux and MacOS by
    allocating 1GB of virtual memory on startup and then slowly using it
    as necessary, when running out of available heap space.
 2. It switches the default GC to be the conservative GC (previously
    extalloc). This is good for consistency with other platforms that
    all use this same GC.

This makes the extalloc GC unused by default.
This commit is contained in:
Ayke van Laethem
2021-05-05 14:52:15 +02:00
committed by Ron Evans
parent c1aa152a63
commit 959442dc82
5 changed files with 39 additions and 12 deletions
+8
View File
@@ -3,3 +3,11 @@
package runtime
const GOOS = "linux"
const (
// See https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/mman-common.h
flag_PROT_READ = 0x1
flag_PROT_WRITE = 0x2
flag_MAP_PRIVATE = 0x2
flag_MAP_ANONYMOUS = 0x20
)