Ah right-o I think i've got it now,
| TempMemory begin_temporary_memory(Memory_Arena* arena)
{
TempMemory result = {.used= arena->used, .arena=arena};
return result;
}
void end_temporary_memory(TempMemory temp, Memory_Arena* arena)
{
arena->used = temp.used;
}
|
and then I can just use the PUSH_STRUCT way of getting some meory from the arena and eventually calling the end_temporary_memory() to reset the used. I've seen those functions being called but missed their implementation, I just have to buy the source really, thanks a bunch already, or are there any glaring bugs in the little bit of code I pasted ?
thanks, Nikki