Win2000 Strange memory thing

Hi,

This is a bit off topic…but I just prefer to ask here and then again, the
program uses SDL :slight_smile:
My program uses SDL/SDL-Mixer and OpenGL, now a strange thing happens,
when I start the program and check the Task Manager, I see my program uses
14 MB! a bit shocked I searched for the cause of this high amount. After
minimizing the window and popping it up again it only uses 2.5 MB and keeps
function normally. It never goes to the 14 MB again.
It doesn’t contain any debug info or anything. Also refreshing the Task
Manager doesn’t help…
Does anyone know this is a bug in the taskmanager of Windows or something ?
Thanks,

Richard van Zon.

I would think it might be W2K is pre-allocating a contiguous block of
memory for your program, so that if it does need that much memory,
asking for it is going to be a lot quicker. Chances are that at some
point, Windows realizes that your program isn’t going to use all that
much memory and reduces the pre-allocated bit to something close to
what your program is actually using.

I’m guessing, here, but with all the things W2K does, I wouldn’t be
surprised if it did this, too.–

Olivier A. Dagenais - Software Architect and Developer

“Richard van Zon” wrote in message
news:9fjn1c$iln$1 at ftp.lokigames.com…

Hi,

This is a bit off topic…but I just prefer to ask here and then
again, the
program uses SDL :slight_smile:
My program uses SDL/SDL-Mixer and OpenGL, now a strange thing
happens,
when I start the program and check the Task Manager, I see my
program uses
14 MB! a bit shocked I searched for the cause of this high amount.
After
minimizing the window and popping it up again it only uses 2.5 MB
and keeps
function normally. It never goes to the 14 MB again.
It doesn’t contain any debug info or anything. Also refreshing the
Task
Manager doesn’t help…
Does anyone know this is a bug in the taskmanager of Windows or
something ?
Thanks,

Richard van Zon.

You are probably referring to what is called the “working set” which is
not that closely related to the memory allocated by your program. Your
program is using that much memory but it is combination of what the code
you write does and what the operating system does. I believe it also
includes any caches of files that you have opened which have been
swapped into memory including the program itself. It also seems to be an
odd combination of virtual versus physical memory.

Richard van Zon wrote:>

Hi,

This is a bit off topic…but I just prefer to ask here and then again, the
program uses SDL :slight_smile:
My program uses SDL/SDL-Mixer and OpenGL, now a strange thing happens,
when I start the program and check the Task Manager, I see my program uses
14 MB! a bit shocked I searched for the cause of this high amount. After
minimizing the window and popping it up again it only uses 2.5 MB and keeps
function normally. It never goes to the 14 MB again.
It doesn’t contain any debug info or anything. Also refreshing the Task
Manager doesn’t help…
Does anyone know this is a bug in the taskmanager of Windows or something ?
Thanks,

Richard van Zon.

You should not measure memory occupation through the Task Manager, that’s
not meant for this.—
Giovanni Bajo
Lead Programmer

Protonic Interactive
www.protonic.net

  • Black holes are generated when God divides by zero -

-----Messaggio originale-----
Da: owner-sdl at lokigames.com [mailto:owner-sdl at lokigames.com]Per conto di
Richard van Zon
Inviato: mercoled? 6 giugno 2001 0.39
A: sdl at lokigames.com
Oggetto: [SDL] Win2000 Strange memory thing…

Hi,

This is a bit off topic…but I just prefer to ask here and then
again, the
program uses SDL :slight_smile:
My program uses SDL/SDL-Mixer and OpenGL, now a strange thing happens,
when I start the program and check the Task Manager, I see my program uses
14 MB! a bit shocked I searched for the cause of this high amount. After
minimizing the window and popping it up again it only uses 2.5 MB
and keeps
function normally. It never goes to the 14 MB again.
It doesn’t contain any debug info or anything. Also refreshing the Task
Manager doesn’t help…
Does anyone know this is a bug in the taskmanager of Windows or
something ?
Thanks,

Richard van Zon.