develooper Front page | perl.beginners | Postings from September 2009

XS: Free memory

Thread Next
Patrick Dupre
September 6, 2009 13:30
XS: Free memory
Message ID:

When I do:
XPUSHs (sv_2mortal (newRV_inc ((SV*) E_rot_up)) ;
Do I need to free the memory ?
I use the XPUSHs to pass an array of real to a perl sub, but I am
not sure that after the call, this memory sapce is freed.
Can I desallocate the memory space manually ?

I tried to use valgrind to check my memort allocation, but it does not
give me much information ! Do you know a tools to check the memory
allocation when perl call C and vice versa ?


  Patrick DUPRÉ                      |   |
  Department of Chemistry            |   |    Phone: (44)-(0)-1904-434384
  The University of York             |   |    Fax:   (44)-(0)-1904-432516
  Heslington                         |   |
  York YO10 5DD  United Kingdom      |   |    email:
Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About