News for hackers. Stuff that matters.
Re:NotepadNext: A cross-platform reimplementation of Notepad++ by VWWHFSfQ on Friday April 08, 2022 @02:31PM (#30960805)
> 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.

Re:NotepadNext: A cross-platform reimplementation of Notepad++ by johncolanduoni on Friday April 08, 2022 @02:38PM (#30960872)
For 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.
Re:NotepadNext: A cross-platform reimplementation of Notepad++ by VWWHFSfQ on Friday April 08, 2022 @02:46PM (#30961003)
Yeah 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.