doufangzhang4454 2013-01-28 09:57
浏览 36

如何在Google Go中增加堆空间

I'm running the Go code from Rober Hundt's benchmark to compare performance of Go with the other languages. When I run the Go code from that benchmark (see http://code.google.com/p/multi-language-bench/source/browse/trunk/src/#src%2Fhavlak%2Fgo) I get an out of memory exception:

................runtime: out of memory: cannot allocate 1048576-byte block (1270808576 in use) throw: out of memory

My question is how I can increase Go's memory space. Is there some start-up parameter or some flag for the compiler that can be set accordingly? The Makefile file of the Go source doesn't reveal anything...

Thanks, Oliver

  • 写回答

4条回答 默认 最新

  • 普通网友 2013-01-28 10:08
    关注

    One can only wildly guess - for the lack of more details.

    • If you're running a 32 bit Go version, try the 64 bit one instead and use the tip revision.
    • If possible, use a *nix platform - it has IMO better memory management.
    评论

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效