in reply to Re^6: panic: memory wrap
in thread panic: memory wrap

Ah, I've got it! You need a PUSHMARK. You also need to push any args:
int record( SV *m ) { PUSHMARK(SP); XPUSHs(m); PUTBACK; call_sv( g_rec, G_VOID ); return 0; }
call_sv takes everything on the stack back to the last mark as the args for the function call. Even with no args, you need to push a mark.

Dave.

Replies are listed 'Best First'.
Re^8: panic: memory wrap
by BrowserUk (Patriarch) on Nov 15, 2005 at 01:06 UTC

    Thankyou! With the addition of the dSP; macro to set things up, that did the trick.

    A million calls to each of the callbacks in 20 seconds of cpu and not a sign of memory growth.

    Many thanks.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^8: panic: memory wrap
by Will_the_Chill (Pilgrim) on Dec 23, 2013 at 12:14 UTC
    Dave,

    Here we are years later and your advice just saved me from a new RPerl bug! Thank you so much for your wisdom.

    Perling,
    ~ Will the Chill