cinera_handmade.network/cmuratori/hero/code/code014.hmml

55 lines
2.9 KiB
Plaintext
Raw Permalink Normal View History

[video output=day014 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Platform-independent Game Memory" vod_platform=youtube id=tcENxzeTjbI annotator=jacebennett annotator=Miblo]
[0:58][Intro to memory management.]
[4:07][We won't be allocating.]
[5:17]['Allocation Festivals']
[5:35][Why talk about allocation now?]
[7:35][What would 'normally' happen]
[11:55][Problem: dynamic allocation spreads managment across code, makes it opaque]
[13:18][Problem: allocation is another trip through the platform layer]
[15:03][What we will do instead]
[17:25][Adding memory to the platform abstraction]
[20:41][Initializing with the new model]
[21:17][Allocating the memory in the platform]
[26:33][Yes, Virginia, memory comes zeroed.]
[28:40][Put it where you want it.]
[33:33][Debugging: Integral promotion]
[36:38][Note that the clear to zero is cheap.]
[37:27][Memory? Check.]
[40:28][Intro to assertions]
[44:33][Avoiding the runtime cost]
[45:03][Build options]
[48:08][Build options for memory]
[50:31][Combining allocations]
[51:30][Debugging]
[55:07][Mission accomplished.]
[56:24][TODO: Pass timing info to game]
[58:24][Q&A][:speech]
[59:20][Reasoning behind Main Memory Pool vs Dynamic Allocation?]
[1:03:31][Why use the void* in game_memory?]
[1:04:13][Elaborate on Permanent vs Transient storage?]
[1:07:03][Will the code be on github \[be public\]?]
[1:07:38][What do you mean by 'avoiding round trips'?]
[1:12:55][Are you going to keep the sound buffer allocation seperate?]
[1:13:14][Why didn't you use libc's assert macro?]
[1:13:43][You're assert has issues.]
[1:14:37][Why did you pick a BaseAddress so high up (2TB)?]
[1:15:09][What is the difference between the memory columns in Task Manager?]
[1:17:41][Tangent: PerfMon]
[1:20:39][Recommended: Channel 9 video: Mark Russinovich Mysteries of Windows Memory Managment.]
[1:21:04][Are there any guidelines for choosing a safe BaseAddress?]
[1:21:46][What happens if the user doesn't have enough RAM?]
[1:22:40][Isn't worrying about not having enough memory silly?]
[1:23:25][Why are you using pools instead of static allocation?]
[1:23:52][What mechanism will we use to assign memory out of our pools?]
[1:24:17][Having Q&A after the episode is like code review. Was that your intent?]
[1:25:16][What about i.e. modding support? You can't tell in advance if you've allowed enough memory for someone else's mod.]
[1:26:34][Will our 64-bit allocation break on Raspberry Pi?]
[1:27:27][Will the Transient storage be freed, or will you just take off its end until its gone?]
[1:27:45][Is it better to keep track of how much memory is freed instead of total size?]
[1:28:06][Why are you reluctant to have to constants be 64-bit integers?]
[1:29:27][Did you pass different flags to VirtualAlloc for permanent and transient storage?]
[1:29:54][What are the 'other reasons' for specifying a BaseAddress.]
[1:31:01][Is it possible the pool will be fragmented?]
[1:33:10][Sign Off][:speech]
[/video]