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

29 lines
2.3 KiB
Plaintext

[video output=day341 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Dynamically Growing Arenas" vod_platform=youtube id=lzdKgeovBN0 annotator=Miblo]
[0:15][Recap and set the stage for the day]
[1:12][Blackboard: Expanding Arenas]
[7:09][Blackboard: How our arenas currently work]
[9:32][Blackboard: Dynamic Array]
[13:53][handmade_memory.h: Enable PushSize_() to expand the memory arena by at least the MinimumBlockSize]
[25:50][handmade_memory.h: Introduce a version of InitializeArena() that takes the MinimumBlockSize]
[28:04][handmade_memory.h: NOTE(casey): PROGRAMMING! RAII = bad \:( ZII = good \:)][quote 528]
[30:19][handmade_memory.h: Add MinimumBlockSize to the memory_arena struct and clean up compile errors]
[35:09][Run the game and see nothing different happen]
[36:06][win32_handmade.cpp: Remove the DebugStorageSize]
[39:34][handmade_debug.cpp: Enable the debug system to use a dynamically growing arena]
[45:51][handmade_debug.cpp: Introduce DEBUGInit()]
[50:03][Run the game and step through DEBUGInit() to see what happens]
[51:54][handmade_debug.cpp: Stop DEBUGInit() from initialising unnecessary data]
[52:35][Continue stepping through DEBUGInit()]
[55:29][handmade_debug.cpp: Make StoreEvent() assume that it never frees]
[56:08][Run the game with our new dynamically growing arena in action]
[57:33][Q&A][:speech]
[58:28][@insobot][Chink. Kappa?]
[58:48][@dr_s80][If you allocate a new block after calling BeginTemporaryMemory, EndTemporaryMemory is going to restore incorrect values, isn't it?]
[59:50][@luam_the_elf][How easy or possible is it to transfer code from Java to an engine that does graphics well and, if it is possible or easy to transfer, which one would you recommend?]
[1:03:12][@cyberpunkhobo][Would it be a good idea to store a pointer to the allocator function inside the arena struct instead of using a global?]
[1:04:36][@flederfalter][How do we free old memory blocks if the base pointer always points to the newest allocated block?]
[1:05:01][@longboolean][Perhaps I am missing something, but how do you go back to previously allocated memory blocks? Like for freeing memory and saving it out and reloading it]
[1:05:49][@luam_the_elf][So are you a cat in your off time?]
[1:06:06][Wind it down][:speech]
[/video]