Re: Concerns confirmed



Wolfgang Sourdeau <wolfgang ultim net> writes:

> La plume légère, à Fri, Nov 03, 2000 at 10:19:59AM -0500, heure d'inpiration,
> Valdis Kletnieks vt edu écrivait en ces mots:
> > First off, this is *NOT* a gdk bug, because the server:
> > a) doesn't *know* the client is gdk
> 
> So what? If there is some X "policy" to not release resources without
> explicit destruction, the programmer has to destroy the resources he created.
> The fact that it is stupid is another thing. Now there are a lot of
> stupid design problems with X...

When a client exits in X, whether it be GTK+ or another client, all
resources that it allocated will be freed. (Unless, they are
in use, as as say, the background pixmap of the root window) 

That does not mean that the memory will be returned to the operating
system - whether that happens depends a lot on exactly how malloc
works on the system, how big the allcated areas are, where they
are in memory, etc.    

But it will be available for reuse within the X server.
 
> I don't think there is a way to know it except by profiling the memory
> usage of the server, which I don't have the time to do.
> Something I am sure of is, now that I am using
> gdk_set_back_pixmap (drawable, NULL, TRUE) the "leak" has diminished from 5Mb
> down to a couple of Kb (~50). I would deduce that the 5Mb was due to a
> leak and that the 50Kb are due to fragmentation.

X servers tend to be fairly well debugged in this respect. 

So, until I see an example program that reproduces the problem,
I'm quite suspicious of this claim. 

That doesn't mean that there couldn't be some really obscure bug
that you happen to be triggering. But I'd be somewhat suprised.

Can you provide a test case?

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]