Hi  ,
          I found memory leak with  the perl API  "perl_eval_sv"  .
          Iam attaching the c code that i used as a sample  to come to the
conclusion that the
          api "perl_eval_sv"  has got memory leaks .
          Iam  stuck with this .
          Could you suggest some way out of this ?



#include <EXTERN.h>
#include <perl.h>

static PerlInterpreter *my_perl;
int main (int argc, char **argv, char **env)
   {
       char *embedding[] = { "", "-e", "0" };

       my_perl = perl_alloc();
       perl_construct( my_perl );

       perl_parse(my_perl, NULL, 3, embedding, NULL);
       perl_run(my_perl);
        SV* sv = newSVpv("Hello",0);
        while(1)
        {
       perl_eval_sv(sv, G_VOID | G_DISCARD);
        }
       perl_destruct(my_perl);
       perl_free(my_perl);
   }

The above code leaks memory which increases by 8k in every 5 minutes .

thanks-
Sanjay

DISCLAIMER: This message is proprietary to Hughes Software Systems
Limited (HSS) and is intended solely for the use of the individual
to whom it is addressed. It may contain  privileged or confidential
information  and should not be circulated or used for any purpose other
than for what it is intended. If you have received this message in error,
please notify the originator immediately. If you are not the intended
recipient, you are notified that you are strictly prohibited from using,
copying, altering, or disclosing the contents of this message. HSS accepts
no responsibility for loss or damage arising from the use of the information
transmitted by this email including damage from virus.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to