When writing libraries
- Avoid allocations if possible, request allocators or buffers from user
- Try and make your library freehosted. (No call of OS functions)
Memory management
- Consider centralizing allocations
- Differentiate between temporary and long lived allocations
- Use buffers with maximum size where possible
- Consider handles instead of pointers (eg.ECS)