On-demand Deallocation
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next timestamp
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 and Index Controls

a
w
s
d
h j k l


Esc Close menu / unfocus timestamp

Quotes and References Menus and Index

Enter Jump to timestamp

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)
0:34On easing the burden of returning to code after a break
0:34On easing the burden of returning to code after a break
0:34On easing the burden of returning to code after a break
2:43Recap and set the stage for the day
2:43Recap and set the stage for the day
2:43Recap and set the stage for the day
3:05build.bat: Turn the debug system back on and assess our situation
3:05build.bat: Turn the debug system back on and assess our situation
3:05build.bat: Turn the debug system back on and assess our situation
4:28Run the game and note that the Last frame time looks weird
4:28Run the game and note that the Last frame time looks weird
4:28Run the game and note that the Last frame time looks weird
5:41handmade_debug.cpp: Consider making FreeFrame work and be called
5:41handmade_debug.cpp: Consider making FreeFrame work and be called
5:41handmade_debug.cpp: Consider making FreeFrame work and be called
7:55handmade_debug_interface.h: Talk through the debug system
7:55handmade_debug_interface.h: Talk through the debug system
7:55handmade_debug_interface.h: Talk through the debug system
15:23handmade_debug.cpp: Consider looking at elements over multiple frames
15:23handmade_debug.cpp: Consider looking at elements over multiple frames
15:23handmade_debug.cpp: Consider looking at elements over multiple frames
20:35handmade_debug.cpp: Consider implementing FreeFrame
20:35handmade_debug.cpp: Consider implementing FreeFrame
20:35handmade_debug.cpp: Consider implementing FreeFrame
21:47"You'll have to excuse me if I yawn during this frame"α
21:47"You'll have to excuse me if I yawn during this frame"α
21:47"You'll have to excuse me if I yawn during this frame"α
21:58handmade_debug.h: Look at debug_frame
21:58handmade_debug.h: Look at debug_frame
21:58handmade_debug.h: Look at debug_frame
23:53Blackboard: "Debug Element"
23:53Blackboard: "Debug Element"
23:53Blackboard: "Debug Element"
30:50handmade_debug_interface.h: Consider making the debug_table be a giant buffer
30:50handmade_debug_interface.h: Consider making the debug_table be a giant buffer
30:50handmade_debug_interface.h: Consider making the debug_table be a giant buffer
33:39Blackboard: Using a giant 64 MiB buffer
33:39Blackboard: Using a giant 64 MiB buffer
33:39Blackboard: Using a giant 64 MiB buffer
41:01handmade.h: Consider providing the ability to allocate memory on demand
41:01handmade.h: Consider providing the ability to allocate memory on demand
41:01handmade.h: Consider providing the ability to allocate memory on demand
42:57Yawnβ
42:57Yawnβ
42:57Yawnβ
43:45handmade.h: Pass the entire AllocationCode to FREELIST_ALLOCATE
43:45handmade.h: Pass the entire AllocationCode to FREELIST_ALLOCATE
43:45handmade.h: Pass the entire AllocationCode to FREELIST_ALLOCATE
46:40handmade_debug.cpp: Consider proving a way to free on demand or give memory_arena the ability to handle memory allocation
46:40handmade_debug.cpp: Consider proving a way to free on demand or give memory_arena the ability to handle memory allocation
46:40handmade_debug.cpp: Consider proving a way to free on demand or give memory_arena the ability to handle memory allocation
47:58handmade.h: Introduce ArenaHasRoomFor and GetEffectiveSizeFor
47:58handmade.h: Introduce ArenaHasRoomFor and GetEffectiveSizeFor
47:58handmade.h: Introduce ArenaHasRoomFor and GetEffectiveSizeFor
51:22handmade_debug.cpp: Introduce PushSizeWithDeallocation
51:22handmade_debug.cpp: Introduce PushSizeWithDeallocation
51:22handmade_debug.cpp: Introduce PushSizeWithDeallocation
56:48handmade_debug.cpp #define DebugPushStruct
56:48handmade_debug.cpp #define DebugPushStruct
56:48handmade_debug.cpp #define DebugPushStruct
57:24handmade.h: Fix compile errors
57:24handmade.h: Fix compile errors
57:24handmade.h: Fix compile errors
58:32handmade_debug.cpp: Replace PushStruct with DebugPushStruct
58:32handmade_debug.cpp: Replace PushStruct with DebugPushStruct
58:32handmade_debug.cpp: Replace PushStruct with DebugPushStruct
59:05handmade_debug.cpp: Pass the correct values to DebugPushStruct
59:05handmade_debug.cpp: Pass the correct values to DebugPushStruct
59:05handmade_debug.cpp: Pass the correct values to DebugPushStruct
59:48handmade_debug.cpp: #define DebugPushCopy
59:48handmade_debug.cpp: #define DebugPushCopy
59:48handmade_debug.cpp: #define DebugPushCopy
1:00:51handmade_debug.cpp: Continue fixing compile errors
1:00:51handmade_debug.cpp: Continue fixing compile errors
1:00:51handmade_debug.cpp: Continue fixing compile errors
1:01:23handmade_debug.cpp: #define DebugPushStruct and consider building in the Push functions to the arenas proper
1:01:23handmade_debug.cpp: #define DebugPushStruct and consider building in the Push functions to the arenas proper
1:01:23handmade_debug.cpp: #define DebugPushStruct and consider building in the Push functions to the arenas proper
1:02:52Compile and run the game, run out of memory and hit our "Not implemented"
1:02:52Compile and run the game, run out of memory and hit our "Not implemented"
1:02:52Compile and run the game, run out of memory and hit our "Not implemented"
1:03:48Q&A
🗩
1:03:48Q&A
🗩
1:03:48Q&A
🗩
1:04:15m1el Have you heard of the DTrace tool? It allows dynamic tracing on running binaries and also kernel! (Not available on windows, though)
🗪
1:04:15m1el Have you heard of the DTrace tool? It allows dynamic tracing on running binaries and also kernel! (Not available on windows, though)
🗪
1:04:15m1el Have you heard of the DTrace tool? It allows dynamic tracing on running binaries and also kernel! (Not available on windows, though)
🗪
1:04:38elxenoaizd You mentioned in the prestream a 'dynamic' memory_arena. How does that actually work since we allocate memory only once? What happens when the arena is full?
🗪
1:04:38elxenoaizd You mentioned in the prestream a 'dynamic' memory_arena. How does that actually work since we allocate memory only once? What happens when the arena is full?
🗪
1:04:38elxenoaizd You mentioned in the prestream a 'dynamic' memory_arena. How does that actually work since we allocate memory only once? What happens when the arena is full?
🗪
1:05:45mojo123X You've mentioned the term "Collation" on this episode and several previous episodes. What exactly do you mean when you use that term?
🗪
1:05:45mojo123X You've mentioned the term "Collation" on this episode and several previous episodes. What exactly do you mean when you use that term?
🗪
1:05:45mojo123X You've mentioned the term "Collation" on this episode and several previous episodes. What exactly do you mean when you use that term?
🗪
1:06:37Mpact What keyboard do you use?
🗪
1:06:37Mpact What keyboard do you use?
🗪
1:06:37Mpact What keyboard do you use?
🗪
1:06:54elxenoaizd Could you elaborate a bit more on what 'memory alignment' means?1
🗪
1:06:54elxenoaizd Could you elaborate a bit more on what 'memory alignment' means?1
🗪
1:06:54elxenoaizd Could you elaborate a bit more on what 'memory alignment' means?1
🗪
1:08:37elxenoaizd But wouldn't asking the OS for more memory expose more failure points thus be against Handmade Hero memory philosophy? Since the whole point of our scheme was that we're sure once we run the game we can't crash
🗪
1:08:37elxenoaizd But wouldn't asking the OS for more memory expose more failure points thus be against Handmade Hero memory philosophy? Since the whole point of our scheme was that we're sure once we run the game we can't crash
🗪
1:08:37elxenoaizd But wouldn't asking the OS for more memory expose more failure points thus be against Handmade Hero memory philosophy? Since the whole point of our scheme was that we're sure once we run the game we can't crash
🗪
1:10:39elxenoaizd I'm always hesitant when using Linked Lists in engine and gameplay code (debug code is fine) because of their cache unfriendliness, random access of memory and difficulty in debugging (you'd have to dig down a node to find what you're looking for). Do you think it's not that big of a deal and I'm worrying too much?
🗪
1:10:39elxenoaizd I'm always hesitant when using Linked Lists in engine and gameplay code (debug code is fine) because of their cache unfriendliness, random access of memory and difficulty in debugging (you'd have to dig down a node to find what you're looking for). Do you think it's not that big of a deal and I'm worrying too much?
🗪
1:10:39elxenoaizd I'm always hesitant when using Linked Lists in engine and gameplay code (debug code is fine) because of their cache unfriendliness, random access of memory and difficulty in debugging (you'd have to dig down a node to find what you're looking for). Do you think it's not that big of a deal and I'm worrying too much?
🗪
1:15:02jim0_o I'm debugging on Day 121. Do you used int instead of int32 for any reason?
🗪
1:15:02jim0_o I'm debugging on Day 121. Do you used int instead of int32 for any reason?
🗪
1:15:02jim0_o I'm debugging on Day 121. Do you used int instead of int32 for any reason?
🗪
1:15:24handmade.cpp and handmade_debug.cpp: Replace int with u32
1:15:24handmade.cpp and handmade_debug.cpp: Replace int with u32
1:15:24handmade.cpp and handmade_debug.cpp: Replace int with u32
1:16:56andsz_ libs like the stb libs let you specify a custom malloc / free function. How would you integrate that into an arena-based system?
🗪
1:16:56andsz_ libs like the stb libs let you specify a custom malloc / free function. How would you integrate that into an arena-based system?
🗪
1:16:56andsz_ libs like the stb libs let you specify a custom malloc / free function. How would you integrate that into an arena-based system?
🗪
1:17:54elxenoaizd Have you heard of VMem?
🗪
1:17:54elxenoaizd Have you heard of VMem?
🗪
1:17:54elxenoaizd Have you heard of VMem?
🗪
1:18:03elxenoaizd If we wanted to use object pools (reusable / recyclable objects for enemies, for example), where would be the best place to store them? Permanent or transient memory? I guess they wouldn't be in transient cause the whole game shares the same pool, so I guess permanent?
🗪
1:18:03elxenoaizd If we wanted to use object pools (reusable / recyclable objects for enemies, for example), where would be the best place to store them? Permanent or transient memory? I guess they wouldn't be in transient cause the whole game shares the same pool, so I guess permanent?
🗪
1:18:03elxenoaizd If we wanted to use object pools (reusable / recyclable objects for enemies, for example), where would be the best place to store them? Permanent or transient memory? I guess they wouldn't be in transient cause the whole game shares the same pool, so I guess permanent?
🗪
1:18:54elxenoaizd reinterpret_cast, static_cast and dynamic_cast: are they of any good use?
🗪
1:18:54elxenoaizd reinterpret_cast, static_cast and dynamic_cast: are they of any good use?
🗪
1:18:54elxenoaizd reinterpret_cast, static_cast and dynamic_cast: are they of any good use?
🗪
1:19:33andsz_ There are libs that allow allocating and freeing multiple chunks of memory during runtime. How would you specify malloc / free for them in an arena-based game like Handmade Hero?
🗪
1:19:33andsz_ There are libs that allow allocating and freeing multiple chunks of memory during runtime. How would you specify malloc / free for them in an arena-based game like Handmade Hero?
🗪
1:19:33andsz_ There are libs that allow allocating and freeing multiple chunks of memory during runtime. How would you specify malloc / free for them in an arena-based game like Handmade Hero?
🗪
1:21:26jim0_o The int use in question was a lot in SIMD'ing DrawRectangle -> DrawRectangleQuickly, and my version of the code is crashing on "Access violation reading location" when casting Pixel to __m128i at the start. Could iterating with int vs int32 be the reason?
🗪
1:21:26jim0_o The int use in question was a lot in SIMD'ing DrawRectangle -> DrawRectangleQuickly, and my version of the code is crashing on "Access violation reading location" when casting Pixel to __m128i at the start. Could iterating with int vs int32 be the reason?
🗪
1:21:26jim0_o The int use in question was a lot in SIMD'ing DrawRectangle -> DrawRectangleQuickly, and my version of the code is crashing on "Access violation reading location" when casting Pixel to __m128i at the start. Could iterating with int vs int32 be the reason?
🗪
1:22:11elxenoaizd What do you think of pass by reference and references? I think they obfuscate the code because it's harder now to see from the calling site to find out if an object is passed by value (copy) or we are actually passing an address of it to modify it
🗪
1:22:11elxenoaizd What do you think of pass by reference and references? I think they obfuscate the code because it's harder now to see from the calling site to find out if an object is passed by value (copy) or we are actually passing an address of it to modify it
🗪
1:22:11elxenoaizd What do you think of pass by reference and references? I think they obfuscate the code because it's harder now to see from the calling site to find out if an object is passed by value (copy) or we are actually passing an address of it to modify it
🗪
1:25:47Wind it down
🗩
1:25:47Wind it down
🗩
1:25:47Wind it down
🗩
1:26:54Announcement: Handmade Hero Forums are now hosted on HandmadeDev.org2
🗩
1:26:54Announcement: Handmade Hero Forums are now hosted on HandmadeDev.org2
🗩
1:26:54Announcement: Handmade Hero Forums are now hosted on HandmadeDev.org2
🗩
1:28:04Announcement: HandmadeCon 20153
🗩
1:28:04Announcement: HandmadeCon 20153
🗩
1:28:04Announcement: HandmadeCon 20153
🗩