4 ms·
> a single huge memory pool and then allocate from it by simply incrementing a pointer into the pool Maybe a register could be used to keep track of the curren
by nullc 10y ago
> a single huge memory pool and then allocate from it by simply incrementing a pointer into the pool
Maybe a register could be used to keep track of the current pointer into this pool, and every time you called into a new function the call could increment the pointer enough for all the usage in a function, and when the function returns it could set it back, automatically deallocating the usage with almost no cost at all?
- to3m 10y agoBut not popping the last allocation when the function returns is kind of the whole point... it is (or certainly was...) common to double-buffer these, so that one frame's data is built up, and then consumed by another thread/the GPU/etc. while the corresponding data for the next frame is being filled in.