microsoft / microsoft/DirectX-Graphics-Samples

Possible leak of large pages in LinearAllocator

Open
#280 1 comment 0 reactions 1 assignee View on GitHub

@stanard is already working on this.

Since Sep 20, 2021.

bug miniengine
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

  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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.