in reply to Perl + Hoard ?

For better or worse, Perl 5 is not going to be losing its refcounted implementation any time soon. The now-defunct Ponie project was an attempt to replace perl's memory management with Parrot's PMCs. While I have no doubts about the skills and competence of the programmers who attempted this heroic feat, it didn't work out as planned.

You can't rip out the guts of a mature code base and replace it with something else and expect everything to work. For instance, the internal layouts of SVs, AVs, HVs and the like have all recently received extensive changes to reduce their memory footprints (while keeping the public interface unchanged).

This work was completed months ago, and yet CPAN modules continue to surface that no longer work with blead, since they apparently have very definite ideas about what the bodies of these things should look like. And all things considered this is a minor issue compared to replacing the memory management infrastructure.

Still, if you are serious about this idea, you should think about an approach that allows this allocator to co-exist with the current system, for instance, asking for a large slab of memory from the underlying system and letting Hoard play with that (assuming you can prevent it from being unexpectedly realloc'ed).

You could then build a custom allocation framework for new code that knows about it and wants to use it. If you want to create this, go ahead. If you get stuck, ask on perl5-porters, and people will help you. I would hate you to have the impression that just because you think it's a good idea that someone else will write the code.

• another intruder with the mooring in the heart of the Perl

Replies are listed 'Best First'.
Re^2: Perl + Hoard ?
by renodino (Curate) on Nov 27, 2006 at 23:34 UTC
    If you want to create this, go ahead.

    Actually, as linked in my OP, I'm already developing a replacement for threads::shared, and hope to test it with Hoard.

    I would hate you to have the impression that ... someone else will write the code.

    If I gave the impression that I expected someone else to implement something, I apologize. My purpose is to elicit comments from anyone w/ Hoard experience, and possibly engender discussion of the possibilities. And yes, I have reviewed the malloc.c and threads::shared code.

    From the tone of your post, I presume you have no experience with Hoard, nor any interest in seeing it applied to Perl ? Yet you still felt the need to post a condescending comment. I had hoped this was a welcome venue for this discussion; I hope Perlmonks isn't falling into the sort of elitism I've witnessed in other forums.

      Perhaps it wasn't the response you wanted, but on the other hand I don't think grinder's post is negative; merely informational and cautionary.
      Part of having a welcoming venue for discussion includes receiving comments and perspectives other than our own and I think grinder's comment meets that criterion.

      [Jon]

Re^2: Perl + Hoard ?
by vkon (Curate) on Nov 27, 2006 at 23:08 UTC
    You can't rip out the guts of a mature code base and replace it with something else and expect everything to work. For instance, the internal layouts of SVs, AVs, HVs and the like have all recently received extensive changes to reduce their memory footprints (while keeping the public interface unchanged).

    replacing memory allocator isn't related to layout of SVs, yet Perl already have different binary incompatile ways of using different memory approaches, so using yet another one is straightforward,
    see my other post on the thread