阅读背景:

为什么下面的golang程序会抛出一个运行时的内存错误?

来源:互联网 

This program is supposed to read a file consisting of pairs of ints (one pair per line) and remove duplicate pairs. While it works on small files, it throws a runtime error on huge files (say a file of 1.5 GB). Initially, I thought that it is the map data structure which is causing this, but even after commenting it out, it still runs out of memory. Any ideas why this is happening? How to rectify it? Here's a data file on which it runs out of memory: This program is supposed to read a file consist




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: