ok, put on your helmets and be prepared for this is an odd blast from
the past. and i am not too serious about it but what the hell, let's
throw it out here.

i was looking at dan's PMC arena allocator struct and it reminded me of
something an older language can do (which MJD has likened to an early
perl :). ever heard of AREA in PL/I? it was a large chunk of ram
dedicated to allocate memory from. what was special is that all pointers
generated by these malloc calls (i forget the pl/1 syntax but it doesn't
matter) were OFFSETS into the area and not direct pointers. the reason
for this was that you can make a complex tree structure out of this AREA
and then write the whole thing to disk as a single chunk, and in another
program read it back in and your structure is back. since all the
pointers are relative to the base of the AREA, you can read it back into
any address in your virtual space.

this neatly solves persistance problems without the need to
stringify/marshall before writing and reversing that upon reading it
back in.

so if you could create a large array of PMC with a large data section,
and tell perl to use it for certain mallocs/frees and make all of those
refs be relative to the base address, it would be cool.

now flame away. i just had to put that out there. i highly doubt it will
ever happen.

uri

-- 
Uri Guttman  ---------  [EMAIL PROTECTED]  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html

Reply via email to