jonnenauha/obj-simplify

fatal error : out of memory

Opened this issue · 2 comments

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.

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.

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