is presently its sole maintainer,
You can support him:
Recap and plan for today
Using the OS's virtual memory system to solve our memory management problem
Tracking memory load
Using an allocation scheme that gets the memory from the OS and returns it on eviction
These changes break the looped live code editing feature
Two approaches: a) deferring LoadBitmap calls till the end of the frame and b) keeping some amount of free space to make loading always possible
Tracking amount of memory used in the asset system (AcquireAssetMemory)
RealeaseAssetMemory requires us to provide the size of asset to free
Using the platform calls instead of the memory arenas
Tracking memory usage and freeing memory at the end of the frame (EvictAssetsAsNecessary)
Evicting the least recently used asset
Distinguishing between bitmaps and sound inside AssetState
Computing the amount of memory taken by an asset
Getting rid of duplicated calculations
Figuring out the location of the chunk of memory to free
Doubly linked list to keep track of least recently used asset
Doubly linked list theory (blackboard)
Semantic setup of pointers
Initial sentinel setup
We should avoid evicting locked assets
Types of doubly linked lists and overview of their implementation
noxy_key Q: What function owns the pointer to the head of linked list?
zuurr_ Q: Isn't a linked list what you're always told not to do if you're care about the cache at all?
insofaras Q: Could the platform_allocate_memory function allocate a few bytes more than requested and store the size there to avoid it having to be passed to the free function?
constantinopol Q: Having a list header at the end of each asset struct, wouldn't that invalidate the cache a lot, when processing the list, since asset structs are potentially large?
phazyck Q: In RemoveAssetHeaderFromList, would it make sense to zero out the prev and next pointers of the header that is being removed, or is it just unnecessary cleanup? Are there pros and cons to this?
captainduh Q: Will there be a fountain of heads somewhere in the actual game, possibly as a Halloween item?
sukmiekok Q: Is Twitch your full-time job?
guit4rfreak Q: How will you re-enable the live code reloading after this is done?
cubercaleb Q: Can you briefly go over inlined functions?
abnercoimbre Q: Which classic data structure do you enjoy implementing the most?
grumpygiant256 Q: Does/will this system support hotloading of assets?
guit4rfreak Q: Does it make sense to write your own non-block dynamic allocator instead of using the memory system of the OS?