On Wed, 30 Jun 2010 19:30:51 +0300, Tiago Vignatti <[email protected]> 
wrote:
> 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 <[email protected]>
> > ---
> > 
> > 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.

It's not an actual leak; the devPrivates code tracks the number of
private structures initialized and at dixResetPrivates time, there
aren't supposed to be any active. If there are, that indicates a
probable memory leak.

> 
> 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

At server startup time, this 'shouldn't' be possible -- this indicates
that a ClientRec has had devPrivates initialized before dixResetPrivates
was called. The patch I posted moved the dixResetPrivates call before
dixAllocatePrivates was called to initialize the serverClient
devPrivates structure.

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

The patch resolves the issue for me; can I get you to make sure you're
running the patched code, and if so, to run the server under gdb with
breakpoints at both dixResetPrivates and dixAllocatePrivates to see how
dixAllocatePrivates is called before dixResetPrivates?

-- 
[email protected]

Attachment: pgpFDwGzkC2NY.pgp
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to