[PATCH] Initialize dev privates before using any

Tiago Vignatti tiago.vignatti at nokia.com
Wed Jun 30 09:30:51 PDT 2010


On Wed, Jun 30, 2010 at 05:39:34PM +0200, ext Keith Packard wrote:
> Initializing the dev privates code after allocating the server client
> dev privates would cause the memory leak check to fire at server
> startup or reset.
> 
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
> 
> This eliminates the memory leak warning which prompted Tiago's change
> to print those only in debug builds.

Honestly I don't know about the code around and didn't understand the
"eliminates the memory leak" that you mentioned.

Anyway, I tested here your patch. At start up I still seeing this:

[ 96638.705] 1 XSELINUXs still allocated at reset
[ 96638.705] TOTAL: 0 objects, 0 bytes, 0 allocs
[ 96638.706] 1 CLIENTs still allocated at reset
[ 96638.706] TOTAL: 0 objects, 0 bytes, 0 allocs


and when the regeneration of the server happens I got this:

1 XSELINUXs still allocated at reset
SCREEN: 0 objects of 124 bytes = 0 total bytes 0 private allocs
COLORMAP: 0 objects of 4 bytes = 0 total bytes 0 private allocs
DEVICE: 0 objects of 16 bytes = 0 total bytes 0 private allocs
CLIENT: 0 objects of 84 bytes = 0 total bytes 0 private allocs
WINDOW: 0 objects of 28 bytes = 0 total bytes 0 private allocs
PIXMAP: 1 objects of 40 bytes = 40 total bytes 0 private allocs
GC: 0 objects of 100 bytes = 0 total bytes 0 private allocs
CURSOR: 0 objects of 4 bytes = 0 total bytes 0 private allocs
CURSOR_BITS: 0 objects of 4 bytes = 0 total bytes 0 private allocs
PICTURE: 0 objects of 4 bytes = 0 total bytes 0 private allocs
TOTAL: 1 objects, 40 bytes, 0 allocs
1 PIXMAPs still allocated at reset
PIXMAP: 1 objects of 40 bytes = 40 total bytes 0 private allocs
GC: 0 objects of 100 bytes = 0 total bytes 0 private allocs
CURSOR: 0 objects of 4 bytes = 0 total bytes 0 private allocs
CURSOR_BITS: 0 objects of 4 bytes = 0 total bytes 0 private allocs
PICTURE: 0 objects of 4 bytes = 0 total bytes 0 private allocs
TOTAL: 1 objects, 40 bytes, 0 allocs


your patch stills not fix the behaviour that I would like to see: to shut up
the server log output.


Thanks,

             Tiago


More information about the xorg-devel mailing list