microsoft / microsoft/snmalloc

Committed memory growing over time

Open
#814 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2k
Forks
138
Avg merge
11h 19m
Merged PRs (30d)
5

Description

Hi !
We are using snmalloc in game engine, where we want both performance and memory efficiency. In our game, as
player moves through environment, lot of content is generated procedurally on worker threads. It is common,
that we allocate (quite big) chunks of memory on one thread, and then release it after while from different thread.
I observe following behavior: even if number of allocated bytes stays roughly same (around 6 GB) memory used by
snmalloc is constantly growing and is significantly higher : usually about 3 GB more and this value is increasing.
Now, question is : is this expected behavior ? Are there any configuration settings which can help us reduce committed
memory size ?

Thanks !
Petr

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported workload: large allocations on worker threads followed by releases from different threads, while comparing live allocated bytes with snmalloc's committed memory. Review the allocator's documented configuration and memory-reclamation behavior; done means establishing whether the growth is expected and identifying a verified setting or a narrowly scoped follow-up if it is not.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.