Re:The Challenges of Integrating the Unix and Mac OS Environ...
by tempodox on Wednesday March 10, 2021 @12:51PM
(#26413986)
You are correct. Resource objects had a `purgeable` bit that would allow the block to be evicted from RAM if memory became scarce. Also, the memory blocks for resources were allocated as `Handles` (essentially, `void **` instead of `void *`, as C malloc() would return). That made the blocks holding the data moveable in memory, for reducing heap fragmentation. If your Handle pointed to a NULL pointer, that meant the block was purged and needed to be reloaded from disk. Manual allocation could also be done as a Handle, further reducing the risk of heap fragmentation.
[ Parent
| on HN ]
There are no comments on this comment yet.