Linux OpenGL apps allocate 140 MB in SDL_SetVideoMode

Hi!

Since I upgraded my notebook to Redhat 9.0 with the latest NVIDIA OpenGL
drivers, it starts swapping like crazy as soon as I run my SDL OpenGL program.

It turns out that inside the function SDL_SetVideoMode, the process allocates
140 MB, which is an awful lot for my 256 MB notebook.

I traced the problem to the following function call in function X11_GL_CreateContext in the file SDL_x11gl.c:

glx_context = this->gl_data->glXCreateContext(GFX_Display,glx_visualinfo, NULL, True);

So it seems like SDL cannot be blamed ;-), but most likely NVIDIA’s GLX module.

My question before I spend more time on that: Has anyone experienced the same problem and done further investigations?

Elmar

Elmar Krieger wrote:

Hi!

Hi,

Since I upgraded my notebook to Redhat 9.0 with the latest NVIDIA OpenGL
drivers, it starts swapping like crazy as soon as I run my SDL OpenGL program.

It turns out that inside the function SDL_SetVideoMode, the process allocates
140 MB, which is an awful lot for my 256 MB notebook.

Well, this is usually just AGP memory (AGP aperture, whose size can
sometimes be set in your BIOS) that is attached to every OpenGL process.
If you want to be sure this is, look at your X line in top, it should
look huge too (for exemple, X has 282 MB in “VIRT” for me, although it
just uses 26Mb in “RES”, so it has 256MB of AGP memory attached). This
happens with every OpenGL program, and hopefully all this memory isn’t
used !

Stephane

PS : Amstrad CPC stil llives :slight_smile:

Look in “ps aux”–RSS is the amount of memory currently used by the
program (eg. not including swapped-out data), and VSZ is the amount
of virtual memory mapped to it. Most people only care about RSS.On Mon, Oct 27, 2003 at 10:34:40PM +0100, Stephane Marchesin wrote:

Well, this is usually just AGP memory (AGP aperture, whose size can
sometimes be set in your BIOS) that is attached to every OpenGL process.
If you want to be sure this is, look at your X line in top, it should
look huge too (for exemple, X has 282 MB in “VIRT” for me, although it
just uses 26Mb in “RES”, so it has 256MB of AGP memory attached). This
happens with every OpenGL program, and hopefully all this memory isn’t
used !


Glenn Maynard