4 ms·
> Due to heap fragmentation and various overhead it would quickly blow up I think this is mostly likely the culprit. There almost definitely isn't that much c
by VWWHFSfQ 5y ago
> Due to heap fragmentation and various overhead it would quickly blow up
I think this is mostly likely the culprit. There almost definitely isn't that much contiguous memory available for a large file like this, so there are a lot of wasted pages (maybe 2-3x) which is causing that footprint to balloon.
- johncolanduoni 5y agoFor 500MB there should easily be enough contiguous virtual address space, and if there isn’t the allocation would fail. I don’t see how it could take up 2-3x extra pages unless it’s being stored in a really poorly designed segmented memory structure.
- VWWHFSfQ 5y agoYeah without knowing anything about the implementation when I see "I opened a 500MB file and it's taking 1.3GB of memory" that's just my first guess. Maybe it's wrong.