Front page | perl.perl5.porters |
Postings from May 2002
Re: perl@16433
Thread Previous
|
Thread Next
From:
Jarkko Hietaniemi
Date:
May 6, 2002 15:34
Subject:
Re: perl@16433
Message ID:
20020507013421.R31692@alpha.hut.fi
On Mon, May 06, 2002 at 11:21:47PM +0100, Nicholas Clark wrote:
> On Mon, May 06, 2002 at 05:50:38PM +0300, Jarkko Hietaniemi wrote:
> > - Storable finishing touches [Nicholas]
>
> As Storable already passes a context object around to make itself thread
> safe, and the leaking problem is only that the malloc()ed buffers:
....and the root context.
> struct extendable keybuf; /* for hash key retrieval */
> struct extendable membuf; /* for memory store/retrieve operations */
> struct extendable msaved; /* where potentially valid mbuf is saved */
>
> don't get free()ed at thread exit, will it work replacing struct extendable
> with an SV? And letting the arena cleanup free the SV at thread exit?
>
> I'm not convinced that using the MT_CXT macros in perl.h is actually needed,
> as they are described by this comment
>
> * Boilerplate macros for initializing and accessing interpreter-local
> * data from C. All statics in extensions should be reworked to use
> * this, if you want to make the extension thread-safe. See ext/re/re.xs
> * for an example of the use of these macros, and perlxs.pod for more.
>
> which implies that they are intended for reworking extensions that currently
> use static variables.
I thought that without ithreads (well, multiplicity) the root context
is a static buffer.
> Nicholas Clark
> --
> Even better than the real thing: http://nms-cgi.sourceforge.net/
--
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen
Thread Previous
|
Thread Next