Kyle R . Burton on Fri, 18 Apr 2003 09:40:58 -0400


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

Re: tying stashes


> All of the examples given in my previous post were generated on a sparc
> platform running perl 5.6.1.  I just spent some time tonight running another
> set of tests on an x86 machine with perl 5.8.0, and was surprised to see
> different results.  Using 5.8.0, if %main:: is tied the program initially
> behaves the same as with 5.6.1, however once the program finishes and perl
> runs garbage collection, MCT::TieHash::DESTROY is never called, and the perl
> process appears to allocate more and more memory until the system resources
> are entirely consumed and it's killed.  Very bizarre:

You could always cheat and use POSIX::_exit to avoid the garbage collection :)
Of course it also avoids all those other annoying other things, like 
destructors, END blocks, and closing and flusing any open file handles.

Not exactly proper behavior...

What about trying to automatically tie all new variables?  Is there
some way to catch the creation of the variable and quickly tie it?
Even if you have to go into XS space? (that's easy enough with
Inline::C).  Are any of these issues any different if you're in a
package namespace?  Have you seen the Safe module, and does it give you
any ideas?

Hrm...I wonder if there is some way to replace the actual HV* that is
%main:: from XS.

Just some more random (possibly useless) thoughts.


Thanks for posting your stuff, it's been interesting reading,
and fun to think about.

Kyle


-- 

------------------------------------------------------------------------------
Wisdom and Compassion are inseparable.
        -- Christmas Humphreys
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------
-
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**