kopolov has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I need help with suspected memory leak in this XS code:
u32 findEAsForGivenRAAndContext(u64 raAddress, u64 lpid, u64 pid, AV* eaAr +ray) PREINIT: u32 resultCount=0; int i=0; int maxCount=10*MAX_NUM_OF_ALIASES; unsigned long long int array[maxCount]; CODE: RETVAL = findEAsForGivenRAAndContext(raAddress, lpid, pid, arr +ay); resultCount = RETVAL; for(i=0; i<resultCount; i++) { SV * sv = newSVnv(array[i]); av_push(eaArray, sv); } OUTPUT: RETVAL
(I'm not sure this is the root cause of my problem, but I have a strong feeling about it)
update - no memory leaks, problem was found elsewhere
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl XS - suspected memory leak
by syphilis (Archbishop) on Apr 04, 2016 at 15:22 UTC | |
|
Re: perl XS - suspected memory leak
by ikegami (Patriarch) on Apr 04, 2016 at 21:29 UTC | |
|
Re: perl XS - suspected memory leak
by Anonymous Monk on Apr 04, 2016 at 16:02 UTC | |
by Anonymous Monk on Apr 04, 2016 at 17:26 UTC |