Re: [Pixman] Valgrind-clean pixman

2010-08-30 Thread Soeren Sandmann
Andrea Canciani writes: > > I may be wrong here, but seems like everyone has his own definition of what > > is > > considered to be "thread safe". Currently pixman appears to be thread safe > > as > > long as same pixman objects (pixman_image_t and the others) are not used > > from > > multipl

Re: [Pixman] Valgrind-clean pixman

2010-08-29 Thread Soeren Sandmann
Siarhei Siamashka writes: > > We probably want to implement DllMain on win32 to allocate/free TLS anyway. > > Yes, I think it makes sense to give this a try. The constructor attribute is > supported since at least gcc 2.95, and it seems to be fine in clang 2.7 too. > There's always a risk that

Re: [Pixman] Valgrind-clean pixman

2010-08-29 Thread Siarhei Siamashka
On Saturday 28 August 2010 12:21:52 Andrea Canciani wrote: > On Fri, Aug 27, 2010 at 3:58 PM, Siarhei Siamashka > > Having something like pixman_init()/pixman_cleanup() functions could > > solve all the problems, but it's an API change. Other solutions (using > > atexit(), using mutexes or atomic o

Re: [Pixman] Valgrind-clean pixman

2010-08-28 Thread Andrea Canciani
On Sat, Aug 28, 2010 at 5:34 PM, Siarhei Siamashka wrote: > On Saturday 28 August 2010 12:21:52 Andrea Canciani wrote: >> On Fri, Aug 27, 2010 at 3:58 PM, Siarhei Siamashka wrote: >> > This code which is setting a global implementation pointer is also not >> > quite thread safe (though very unlike

Re: [Pixman] Valgrind-clean pixman

2010-08-28 Thread Benjamin Otte
On Sat, 2010-08-28 at 18:34 +0300, Siarhei Siamashka wrote: > I may be wrong here, but seems like everyone has his own definition of what > is > considered to be "thread safe". Currently pixman appears to be thread safe as > long as same pixman objects (pixman_image_t and the others) are not use

Re: [Pixman] Valgrind-clean pixman

2010-08-28 Thread Siarhei Siamashka
On Saturday 28 August 2010 12:21:52 Andrea Canciani wrote: > On Fri, Aug 27, 2010 at 3:58 PM, Siarhei Siamashka wrote: > > This code which is setting a global implementation pointer is also not > > quite thread safe (though very unlikely to cause any practical problems > > other than a bit bigger o

Re: [Pixman] Valgrind-clean pixman

2010-08-28 Thread Andrea Canciani
On Fri, Aug 27, 2010 at 3:58 PM, Siarhei Siamashka wrote: > On Thursday 26 August 2010 20:40:08 Andrea Canciani wrote: >> Currently pixman allocates dynamically its implementations, but does >> not free them. >> This is not a true memory leak, since implementations are only >> allocated once, but

Re: [Pixman] Valgrind-clean pixman

2010-08-27 Thread Siarhei Siamashka
On Thursday 26 August 2010 20:40:08 Andrea Canciani wrote: > Currently pixman allocates dynamically its implementations, but does > not free them. > This is not a true memory leak, since implementations are only > allocated once, but > many debugging tools will report the asyimmetric malloc/free as

[Pixman] Valgrind-clean pixman

2010-08-26 Thread Andrea Canciani
Currently pixman allocates dynamically its implementations, but does not free them. This is not a true memory leak, since implementations are only allocated once, but many debugging tools will report the asyimmetric malloc/free as a memory leak. I wrote a patch that avoids allocating pixman_impleme