3 ms·
That seems to be something different; instead of getting the memory when some other application needs it, the OS receives the memory when the application (brows
by rhn_mk1 7y ago
That seems to be something different; instead of getting the memory when some other application needs it, the OS receives the memory when the application (browser) doesn't need it any longer, so it can't be used for caching.
This actually looks exactly like the malloc/free use case.
- magicalhippo 7y agoHow can't it be used for caching? Say you decode an image, then offer the memory backed by it to the OS. If you need to access the image data again you try to reclaim the memory, if it fails it's a cache miss.
- rhn_mk1 7y agoYou're right, the missing info I didn't notice was the return value.