NVIDIA / NVIDIA/cuda-samples

memory leak in memMapIpc

Open
#155 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
9.6k
Forks
2.4k
Avg merge
53m
Merged PRs (30d)
1

Description

OS: Windows11
Platform: Visual Studio 2022 Debug X64
Version: NVIDIA-SMI 516.94 Driver Version: 516.94 CUDA Version: 11.7

In the sample memMapIPCDrv, seems like memory does not release to the OS (Both GPU memory and CPU memory) utile child process exit.
Is this a bug? or I miss some cleanup?

PS.

  • I change DATA_BUF_SIZE to 4G.
  • I move the cuMemRelease in parent process ahead of waitProcess, and both child process and parent process pause just before call exit.

GPU before

GPU after

CPU

Contributor guide

Open the contributing guide

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 with the Samples/3_CUDA_Features/memMapIPCDrv sample entry point and trace DATA_BUF_SIZE, cuMemRelease, and waitProcess in both processes. Reproduce the 4G Windows Debug X64 case, then compare resource lifetime through child and parent exit; done when the memory behavior is explained and the sample or issue guidance reflects the verified cleanup behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.