[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Interfacing to XCMD/XFCNs



Hi,

Recently I wrote to the list to describe a problem I had with a memory 
leak when making CommConnect.pl calls. I have tracked the leak down a bit 
further and have determined that it is not unique to CommConnect but 
rather occurs with any call to an XCMD or XFCN. 

I created increasingly simple XFCNs using CodeWarrior and examined their 
behavior using a Perl script which repeatedly makes calls to my XFCN. 
Using this system I was able to identify a 19 or 20 byte leak per XFCN 
call. I can't tell whether it is 19 or 20 because of limitations in the 
statistics (the leak rate comes out just about at 19.5 bytes/call, go 
figure).

Even this small of a leak is significant for my application because I 
have a script running constantly which is slurping data in through the 
serial port from a magnetometer sensor, processing, archiving, and 
uploading it to a different web server machine. As of this writing, I 
must restart macPerl just about once per day or face the dreaded "out of 
memory" notification.

I am curious if anyone else has had any similiar experience with 
XCMD/XFCN interfaces or might have any thoughts on the source of the 
leak. I'll be happy to provide the (very simple) test code if anyone 
wants to see it.

Joseph


--
Joseph A. DiVerdi, Ph.D.                      970.221.3982 (voice)    
diverdi@XTRsystems.com (email)                970.224.3723 (fax)
http://www.XTRsystems.com
%PGPKey=('D50A9E33',[1024,'D790 3F87 2944 1E65 3286 1AD4 1A10 C5E1 D50A 
9E33'])


===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org