I'm working currently on a memory management system for a game engine.
I've read a lot of articles and books about it and think I understood the main part, still there are some questions:
If I understoo it right you have to take the memory youwant to use over the game ap as a static field.
fr example i got an linear allocator:
I would do something like this
linearAllocator.start = subsystemMemory;
char* renderSystem = linearAllocator.Allocate(sizeof(renderSystem), 4);
So to say I could do a file, where i declare all of the memory as static and use it over the game?
Next would be the alignment: Do I have to align my memory always in the type of the system im working? example: 32bit 4 byte align and so on?
Last I know about linear, stack, double-ended stack and pool allocators. Are there more that I should learn about?
Thank you for your time and merry christmas!