Introduction to General Purpose Allocation
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next marker
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu Movement

a
w
s
d
h j k l


Quotes and References Menus

Enter Jump to timecode

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
00:00:18Plan for today
00:00:18Plan for today
00:00:18Plan for today
00:01:28Our asset memory management problem can't be solved by a garbage collector
00:01:28Our asset memory management problem can't be solved by a garbage collector
00:01:28Our asset memory management problem can't be solved by a garbage collector
00:02:36Asset memory management (blackboard)
00:02:36Asset memory management (blackboard)
00:02:36Asset memory management (blackboard)
00:03:40A good way to think about memory management
00:03:40A good way to think about memory management
00:03:40A good way to think about memory management
00:10:04The amount of memory we need is larger than the amount of memory we have. We have a Virtual Memory problem.
00:10:04The amount of memory we need is larger than the amount of memory we have. We have a Virtual Memory problem.
00:10:04The amount of memory we need is larger than the amount of memory we have. We have a Virtual Memory problem.
00:15:01Stacks and GC can't help us in this situation
00:15:01Stacks and GC can't help us in this situation
00:15:01Stacks and GC can't help us in this situation
00:16:32Memory fragmentation
00:16:32Memory fragmentation
00:16:32Memory fragmentation
00:19:20In a world were all the assets were the same size...
00:19:20In a world were all the assets were the same size...
00:19:20In a world were all the assets were the same size...
00:21:20In our case assets are not the same size, but we could find ways around that
00:21:20In our case assets are not the same size, but we could find ways around that
00:21:20In our case assets are not the same size, but we could find ways around that
00:23:35We could have a big sprite sheet and page the chunks in when they were needed (similar to Megatexture)
00:23:35We could have a big sprite sheet and page the chunks in when they were needed (similar to Megatexture)
00:23:35We could have a big sprite sheet and page the chunks in when they were needed (similar to Megatexture)
00:27:54Another option: A variable allocator. It could defragment memory or merge contiguous freed spaces. We're choosing this one for educational reasons
00:27:54Another option: A variable allocator. It could defragment memory or merge contiguous freed spaces. We're choosing this one for educational reasons
00:27:54Another option: A variable allocator. It could defragment memory or merge contiguous freed spaces. We're choosing this one for educational reasons
00:31:36Overview of the variable allocator
00:31:36Overview of the variable allocator
00:31:36Overview of the variable allocator
00:34:18Running out of memory on purpose
00:34:18Running out of memory on purpose
00:34:18Running out of memory on purpose
00:37:14Restructuring loaded_bitmap and loaded_sound to move asset data inside asset_slots
00:37:14Restructuring loaded_bitmap and loaded_sound to move asset data inside asset_slots
00:37:14Restructuring loaded_bitmap and loaded_sound to move asset data inside asset_slots
00:49:41Moving asset data inside asset_slots
00:49:41Moving asset data inside asset_slots
00:49:41Moving asset data inside asset_slots
00:52:54Determining ahead of time when we're going to hit our memory limit
00:52:54Determining ahead of time when we're going to hit our memory limit
00:52:54Determining ahead of time when we're going to hit our memory limit
00:54:00We can't free assets to make room for new ones from inside a call to LoadBitmap
00:54:00We can't free assets to make room for new ones from inside a call to LoadBitmap
00:54:00We can't free assets to make room for new ones from inside a call to LoadBitmap
00:55:35We 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
00:55:35We 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
00:55:35We 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
00:57:44Q&A
🗩
00:57:44Q&A
🗩
00:57:44Q&A
🗩
00:57:57pseudonym73 It's official: Assets are now handles
🗪
00:57:57pseudonym73 It's official: Assets are now handles
🗪
00:57:57pseudonym73 It's official: Assets are now handles
🗪
00:58:37robotchocolatedino Would there be a benefit to using a 2-level cache for storing compressed and uncompressed assets?
🗪
00:58:37robotchocolatedino Would there be a benefit to using a 2-level cache for storing compressed and uncompressed assets?
🗪
00:58:37robotchocolatedino Would there be a benefit to using a 2-level cache for storing compressed and uncompressed assets?
🗪
00:59:35marumoto Is there any performance reason to not use malloc and free?
🗪
00:59:35marumoto Is there any performance reason to not use malloc and free?
🗪
00:59:35marumoto Is there any performance reason to not use malloc and free?
🗪
01:00:52gasto5 Are there technical terms for the memory emptiness assurance algorithm?
🗪
01:00:52gasto5 Are there technical terms for the memory emptiness assurance algorithm?
🗪
01:00:52gasto5 Are there technical terms for the memory emptiness assurance algorithm?
🗪
01:01:17duel1000 Can you talk a bit about what new / delete actually does and when to use them?
🗪
01:01:17duel1000 Can you talk a bit about what new / delete actually does and when to use them?
🗪
01:01:17duel1000 Can you talk a bit about what new / delete actually does and when to use them?
🗪
01:12:33pseudonym73 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
🗪
01:12:33pseudonym73 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
🗪
01:12:33pseudonym73 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
🗪
01:14:16zouchk42 Is there a real "philosophy" difference between using smart pointers and garbage collection? Or are smart pointers just a way to implement garbage collection?
🗪
01:14:16zouchk42 Is there a real "philosophy" difference between using smart pointers and garbage collection? Or are smart pointers just a way to implement garbage collection?
🗪
01:14:16zouchk42 Is there a real "philosophy" difference between using smart pointers and garbage collection? Or are smart pointers just a way to implement garbage collection?
🗪
01:19:32thesizik What about RAII?
🗪
01:19:32thesizik What about RAII?
🗪
01:19:32thesizik What about RAII?
🗪
01:29:42gasto5 How about vibration effect assets?
🗪
01:29:42gasto5 How about vibration effect assets?
🗪
01:29:42gasto5 How about vibration effect assets?
🗪
01:29:50soysaucethekid What is the difference between a megatexture and a texture atlas?
🗪
01:29:50soysaucethekid What is the difference between a megatexture and a texture atlas?
🗪
01:29:50soysaucethekid What is the difference between a megatexture and a texture atlas?
🗪
01:30:33plain_flavored Do you object to use of explicit vtables, like you would have to use in C?
🗪
01:30:33plain_flavored Do you object to use of explicit vtables, like you would have to use in C?
🗪
01:30:33plain_flavored Do you object to use of explicit vtables, like you would have to use in C?
🗪
01:31:15starchypancakes 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.
🗪
01:31:15starchypancakes 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.
🗪
01:31:15starchypancakes 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.
🗪
01:32:33pseudonym73 (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.
🗪
01:32:33pseudonym73 (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.
🗪
01:32:33pseudonym73 (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.
🗪
01:33:04gaudongaming 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?
🗪
01:33:04gaudongaming 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?
🗪
01:33:04gaudongaming 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?
🗪