is presently its sole maintainer,
You can support him:
Plan for today
Our asset memory management problem can't be solved by a garbage collector
Asset memory management (blackboard)
A good way to think about memory management
The amount of memory we need is larger than the amount of memory we have. We have a Virtual Memory problem.
Stacks and GC can't help us in this situation
In a world were all the assets were the same size...
In our case assets are not the same size, but we could find ways around that
We could have a big sprite sheet and page the chunks in when they were needed (similar to Megatexture)
Another option: A variable allocator. It could defragment memory or merge contiguous freed spaces. We're choosing this one for educational reasons
Overview of the variable allocator
Running out of memory on purpose
Restructuring loaded_bitmap and loaded_sound to move asset data inside asset_slots
Moving asset data inside asset_slots
Determining ahead of time when we're going to hit our memory limit
We can't free assets to make room for new ones from inside a call to LoadBitmap
We can mark bitmaps as freed between frames. Two options: a) deferring LoadBitmap calls till the end of the frame and b) keeping some amount of free space to make loading always possible
pseudonym73 Q: It's official: Assets are now handles
robotchocolatedino Q: Would there be a benefit to using a 2-level cache for storing compressed and uncompressed assets?
marumoto Q: Is there any performance reason to not use malloc and free?
gasto5 Q: Are there technical terms for the memory emptiness assurance algorithm?
duel1000 Q: Can you talk a bit about what new / delete actually does and when to use them?
pseudonym73 Q: Could you briefly comment on how viable it would be to recast the problem as one of asset packing? Split sounds into fixed-sized chunks and dice bitmaps into fixed-size tiles, so that all of the tiles are of a reasonable size. Group related assets together so they are loaded together. That sort of thing
zouchk42 Q: Is there a real "philosophy" difference between using smart pointers and garbage collection? Or are smart pointers just a way to implement garbage collection?
thesizik Q: What about RAII?
gasto5 Q: How about vibration effect assets?
soysaucethekid Q: What is the difference between a megatexture and a texture atlas?
plain_flavored Q: Do you object to use of explicit vtables, like you would have to use in C?
starchypancakes Q: Would thinking about asset allocation in terms of the maximum amount of pixels that can be displayed on screen at one time be worth it (for instance with your 16MB safety buffer). So you tailor the asset loading to load assets at a resolution proportional to the distance to the camera and operate under the assumption that only a fixed number of things can "physically" occupy the high-res space and so on for medium, low, etc.
pseudonym73 Q: (Referring to Q at 01:12:33) The thing I didn't see was grouping small related assets together so they fit in one allocation unit.
gaudongaming Q: Is this still the same blackboard file from day 1? Is there a fully zoomed out view and how much RAM is that program consuming now with all your current doodles?