jonnenauha / obj-simplify

Object File (.obj) simplifier
MIT License
133 stars 16 forks source link

fatal error : out of memory #6

Open Aerevia opened 6 years ago

Aerevia commented 6 years ago

When trying to simplify a file, I get this error after RAM usage goes up to 34GB using amd64 version on Windows (tried with windows 10 and windows server 2012).

runtime: out of memory: cannot allocate 2359296-byte block (34358820864 in use) fatal error: out of memory

It crashes way faster when using 386 version. Is this a RAM problem ? I have 64GB.

jonnenauha commented 5 years ago

No, its my programs problem. I should implement it so that the full file does not have to be in memory when parsing input or writing output. Right now the implementation was naive and I did not think of files bigger than what most people have for memory. I don't know when I would want to implement this. It would probably be some kind of option to use disk instead of mem, to now slow down the "normal" users.

calonx commented 5 years ago

FWIW, I'm hitting the same out-of-memory issue when running your script on a mere 74.1 MB .obj file.

I didn't see what the total memory usage was when I hit that error, but considering that I've got 64 GB as well... On the second run, I cancelled it at ~26 GB memory in use (55+ million page-faults for only a few minutes of runtime).

Never mind! I only thought I cancelled it -- turns out it was still chugging away. 😁 image