Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Requirement of a custom memory allocator + custom smart pointer implementation #4

Open
shreyaspranav opened this issue Nov 10, 2024 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@shreyaspranav
Copy link
Collaborator

As of now, the game engine uses the default new and delete operators to dynamically allocate and free memory. As the project becomes larger with bigger systems, there is a requirement of a custom memory allocator. Certain systems such as the asset system will benefit from this as there are a lot of memory allocations involved in handling assets.

Features required in the custom memory allocator

  • Custom operators for allocating and freeing memory in the heap with fast allocation and deallocation.
  • Allocator must be optimized for current use case (i.e., mostly asset management. Will later explore the other use cases)
  • The custom memory allocators must be used with the other STL containers and algorithms.
  • Custom implementation of smart pointers (such as std::shared_ptr) with a reference counting system.
  • Means of debugging memory allocations and possible memory leaks using external tools such as Valgrind.

By implementing a custom allocator with these features, the asset system and other systems will benefit from better control over how memory is used, all while maintaining compatibility with existing C++ containers and tools.

@shreyaspranav shreyaspranav added enhancement New feature or request help wanted Extra attention is needed labels Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant