microsoft / microsoft/DirectX-Graphics-Samples
Possible leak of large pages in LinearAllocator
@stanard is already working on this.
Since Sep 20, 2021.
- Dominant language
- C++
- Stars
- 6.8k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
I have an application derived from MiniEngine. It makes one large allocation (3MB) for a vertex buffer via ReserveUploadMemory, followed by a small allocation (200KB) for an index buffer, and then no further allocations via LinearAllocator. The large page moves into m_deletionQueue in FreeLargePages, but the deletion queue is never pumped again, due to the early exit in CleanupUnusedPages. At application exit, I see one dangling large page, and indeed it is still sitting in m_deletionQueue when LinearAllocator::DestroyAll() is called.
My local fix is to move the FreeLargePages logic above the early exit in CleanupUnusedPages.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.