[SDL] Just a curious question

Jim Tilander jt at dd.chalmers.se
Sun Aug 8 06:10:19 PDT 1999


> step
> step
> step
> step
> step
> step
> uh, oh anways, after stepping through many lines of code... I found the line
> thats alocating the ~32 megs of memory. 
> 
> XF86DGAGetVideo(SDL_Display, SDL_Screen,
>     			&unused_ptr, &unused_int, &unused_int, &total_mem);
> which is in line 157 of  src/linux/x11/SDL_sysvideo.c
> 
> I don't know much about the DGA or xlib functions and what they're doing so
> theres not much else I can say. 
> 

My guess is that the XF86DGAGetVideo() call does some kind of memory 
mapping of the viedomemory ( don't know that much about DGA/X but 
that's how it works in DOS, hehe ), and hence the memory usage of the 
program get all screwed up. I took the figures from a previous 
posting:


----

  PID TTY MAJFLT MINFLT   TRS   DRS  SIZE  SWAP   RSS  SHRD   LIB  DT 
COMMAND
  1448  p0    554    633    32  3284  3316     0  3316  1904     0 
653 ProjectX

  PID TTY MAJFLT MINFLT   TRS   DRS  SIZE  SWAP   RSS  SHRD   LIB  DT 
COMMAND
 1453  p0    582    641    32 36056 36088     0 36088  2016     0 658 
./ProjectX



----

(36088 - 3316) / 1024 == 32

My guess is that you have 32mb on your videocard? Sun's Xserver does 
the same thing... Might be considered as a bug/feature of 'ps' though 
:)


//Jim




Jim Tilander
System Administrator at Chalmers University of Technology, 
Engineering Physics
phone: +46 31 772 3390 fax: +46 31 772 3204





More information about the SDL mailing list