我有一个 Go 程序,我想在交换机上运行它。由于我无法在交换机上安装 Go,我只是复制可执行文件并尝试运行。但我收到以下错误。
runtime: panic before malloc heap initialized
fatal error: runtime: cannot reserve arena virtual address space
runtime stack:
runtime.throw(0x8149b8b)
/usr/local/go/src/pkg/runtime/panic.c:520 +0x71
runtime.mallocinit()
/usr/local/go/src/pkg/runtime/malloc.goc:552 +0xf2
runtime.schedinit()
/usr/local/go/src/pkg/runtime/proc.c:150 +0x3a
_rt0_go()
/usr/local/go/src/pkg/runtime/asm_386.s:95 +0xf6`
如何打包 Go 可执行文件及其所有依赖项?
编辑 1:这是ulimit -a转储。
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 40960
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 1024
virtual memory (kbytes, -v) 395067
file locks (-x) unlimited
繁花不似锦
相关分类