Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
encoding/gob: Gob encoder's buffering all data in memory may cause oom #8316
My program is saving a big data structure that is about half the current memory. I found `Encode.EncodeValue` will firstly buffer all the data to the memory (in enc.byteBuf), then write it as a whole (by calling enc.writeMessage). This consumes almost the same amout of memory as the value to encode. My program then occasionally panic because of out of memory. Can we make it better? go version go1.3 linux/386