Skip to content
Discussion options

You must be logged in to vote

In the allocator, mem allocation is handled by PushSize_.

  1. PushSize_ calculates the actual size needed with alignment padding.
  2. Checks the current memory block to see that it has enough space.
    If there's not enough space, it allocates a new memory block at either the minimum or big enough size. It then chains this block onto the memory arena.
  3. It hands back the pointer into the block (which is Result).
  4. If the allocation was flagged to be cleared to 0 (ArenaFlag_ClearToZero), the new memory block is zero initialized.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by btgvesta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants