dsfbnhc4373 2015-01-31 11:36
浏览 125
已采纳

增加最大分配内存Golang 1.4+

I'm thinking about upgrading to Go 1.4 but am concerned because I no longer know how to change the max amount of memory I can address. I have been using Go to run some machine learning experiments on a large server, 512GB of main memory, which makes the 128GB limit set using a 37 bit address insufficient.

Previously I would edit malloc.h in the runtime package to change to 38 bit addresses but with the conversion from C to Go of the source I'm having difficulty finding if there is still something as simple to modify.

This commit that changed max memory to 128GB from 16GB shows the kind of change I am talking about https://code.google.com/p/go/source/detail?r=a310cb32c278

  • 写回答

1条回答 默认 最新

  • dougu8742 2015-01-31 22:54
    关注

    So I realized I did not find the file because I am not use to using the Google Code repo explorer. I located what are now 3 malloc.go files and have found the relevant section of code. https://code.google.com/p/go/source/browse/src/runtime/malloc2.go#122

    Honestly I think the update using 1 and 0 booleans and multiplication rather than simple if statements is overly confusing and doesn't convey what is going on as clearly as the header file used to.

    Also thank you bamboon I only realized my mistake after reading the mailing list and getting linked to a different repo viewer.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探