mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 11:07:46 +00:00
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:
committed by
Ron Evans
parent
c1aa152a63
commit
959442dc82
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user