View Single Post
Old 04-24-08, 11:28 AM   #1
muhkuh
Registered User
 
Join Date: Jun 2005
Posts: 10
Exclamation memory leak in nvidia kernel module

Hello,

we are experiencing a continuous memory leak using drivers ranging from 1.0-9762 to current 173.08. The leak seems to be in glXSwapBuffers.

There are two things that seem to influence the matter:

1. There is some frame cap code that does several calls to usleep and gettimeofday to limit the frame rate to 30 fps. When this code is removed the leak disappears.

2. When VSYNC is disabled the leak disappears too.

I attached a minimal test case that uses glut to create a window and does nothing more than:

clear framebuffer
call usleep(10) several times
swap buffers

When starting this test case with __GL_SYNC_TO_VBLANK=1 and monitoring the kernel module by calling:
vmstat -m | grep nvidia

there is a significant leak (1k every 10s). Setting __GL_SYNC_TO_VBLANK=0 the leak is gone as stated above.

System: FreeBSD 6.2
Intel Celeron (P4) 2GHZ
512 MB Ram
GeForce FX 5200 256 MB
Intel 865G Chipset

The system is used in an embedded environment so the leak is a big problem.


The attached test requires a version of glut to compile.


Thanks in advance.


Markus


Edit:
I made a bug report: NVIDIA Bug ID: 420133
Attached Files
File Type: gz nvidia_memory_leak_test.tar.gz (3.8 KB, 273 views)

Last edited by muhkuh; 05-05-08 at 03:14 AM.
muhkuh is offline   Reply With Quote