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

Better memory management in Burn Compute #1752

Open
mepatrick73 opened this issue May 9, 2024 · 0 comments
Open

Better memory management in Burn Compute #1752

mepatrick73 opened this issue May 9, 2024 · 0 comments
Assignees
Labels
performance Anything related to performance

Comments

@mepatrick73
Copy link
Contributor

Feature description

Implementing a memory management allocation strategy that is more aggressive in reusing old memory.

  • Should reduce memory fragmentation
  • Should reduce the memory allocation overhead by reusing unused memory

Feature motivation

Currently the memory allocator just frees unused memory every n allocations. This leads to a very "zig-zaggy" memory usage pattern. Furthermore, if a chunk has some free space, it will not be used by another allocation leading to internal fragmentation.

(Optional) Suggest a Solution

Instead of freeing memory every n allocations, wait until memory usage hits a certain threshold and then try to free unused memory.
Use the idea of offset to reuse free memory within a chunk if there is enough space.

@mepatrick73 mepatrick73 added the performance Anything related to performance label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Anything related to performance
Projects
Status: No status
Development

No branches or pull requests

1 participant