Parallel routine memory leak?

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
yuiduan
Participant
Posts: 15
Joined: Tue Oct 26, 2004 1:06 am

Parallel routine memory leak?

Post by yuiduan »

Hi
I begin to write parallel routine/functions with my rust c++ knowledge. By looking through this forum, I am still not sure if DS engine is handling memory deallocation. For example, if my function is returning a char*, and the DS engine does not free the memory for that pointer, how can I free from the function itself?

Any feedback will be appreciated.

Thanks.
iDomz
Participant
Posts: 81
Joined: Wed Jul 25, 2007 5:25 am
Location: London

Post by iDomz »

Obviously, you cannot free it from the function you are returning from. You may be able to work-around it by handling it the way pl/sql procedures work - making your return parameter as input.

I had the same doubt but the gurus have told me to trust ds on this. Had created a string replace function to test it out and could not see any leaks even after muching thru millions of records, so I am pretty much a convert now
yuiduan
Participant
Posts: 15
Joined: Tue Oct 26, 2004 1:06 am

Post by yuiduan »

iDomz
Thanks a lot for your reply. I tend to believe the DS engine should free the memory from the function. Your expirement enhances my believing.
Cheers
kavuri
Premium Member
Premium Member
Posts: 161
Joined: Mon Apr 16, 2007 2:56 pm

Post by kavuri »

yuiduan,
if you satisfy with the answer please mark the posting as resolved.


Kavuri
Post Reply