top | item 44645108

(no title)

vkoskiv | 7 months ago

> For many apps the main source of memory usage isn't stack or heap memory consumed during runtime, it's the loading of the binary itself into memory.

Does iOS not do demand paging?

discuss

order

potatolicious|7 months ago

AFAIK not for the program itself. Plenty of ability to page for other runtime memory consumption. I can only assume this is done with a presumption that responsiveness is a greater priority than the ability to accommodate extremely large binaries and suffer cache thrash.

While the process is active the whole binary is loaded (note: may not include dynamically linked libs, which is why that's a good idea - dylibs can be configured to load on-demand).

A triply-good reason why the pattern of "giant ball of statically linked things" is an anti-pattern.