Nicholas Clark <[EMAIL PROTECTED]> wrote: > On Fri, Apr 30, 2004 at 01:54:58PM +0200, Leopold Toetsch wrote:
> And instead the perl regression tests that use SIGHUP fail. > (There are also tests on SIGUSR1, but not SIGUSR2, it seems) Argh. I grepped through all perl 5.8.0 tests and didn't find SIGHUP. So I thought, it's usable. AFAIK is SIGUSR2 not usable due to linuxthreads. But anyway, can we just grab different signals for Parrot and Ponie testing. AFAIK if a test runs with SIGINT or SIGUSR1, SIGHUP will work too. >> C<x> would be outside of the visible range of stack items. The braces do >> of course indicate stack frames. > This is true. And yes you need to set a stack top if you're expecting the > stack walking to find things you own. But I'm thinking about the case where > the embedding app registers all its PMCs immediately, and so doesn't expect > (or want) to be stack walked. Each PMC allocation can trigger DOD and or GC. If you never free any PMC until program termination, you can turn off both DOD and GC. I doubt that this is a reasonable scenario, though. And if you "unuse" PMCs and DOD is off, you'll quickly run out of resources because recycling can't be done then. If you really don't want to rely on stack walking, you have to register each PMC with C<Parrot_register_pmc()>. This function uses a hash for remembering the PMC's address. So it's not really fast. > I doubt that ponie will be the only app wanting to take control of the > lifetime of all its PMC acting as references into the parrot VM Well, Parrot does DOD/GC. It'll not start refcounting ... But I really don't think, that this is an issue. You just need to start your app like this: main() {} void *stack_top; return real_main(stack_top); // pass &stack_top to parrot } then every PMC is for sure covered by the stack walking code. And there is of course the scheme described in t/src/basic_3 with Parrot_run_native(), which already does The Right Thing(tm). [ global syms ] >> Yep. A lot of. What's perl5 doing against those? > Prefixing all the linkable functions as Perl_ or PerlIO_ etc Ugly. Can't the linker hide it? > Nicholas Clark leo