4 ms·
Well, the only drawback that comes to mind is that you can't mutate the state of that blob (well, you can, but you really really shouldn't). Also if it's obscen
by spoiler 11y ago
Well, the only drawback that comes to mind is that you can't mutate the state of that blob (well, you can, but you really really shouldn't). Also if it's obscenely large, it might be better to keep it on disk and load only as much as you need/can.
- icebraining 11y agoAlso if it's obscenely large, it might be better to keep it on disk and load only as much as you need/can. That's what this technique does, since the kernel doesn't fully load the executable file to memory, it'll mmap it but only load data from disk as it's requested.
- spoiler 11y agoI wasn't aware that kernel did that. Now that you said it, it's obvious that they would, but it never actually crossed my mind. Thanks for providing some insight and making me a bit wiser! :-)
- jheriko 11y agothats only true in some cases. in general it is not true.
- kentonv 11y agoWhen is it not true?
- kentonv 11y agoYes, this mostly only makes sense for immutable data.