bus errors and segfaults using nlffi and OS X

brian <briand-/[email protected]>
Newsgroups gmane.comp.lang.sml.smlnj
Message-ID <[email protected]>
I've been able to successfully use the nlffi for a CBLAS/CLAPACK  
interface.

However I am having very consistent problems with bus errors and  
segfaults whenever I try to free or discard memory.

The really strange thing is that I seem to have a problem when  
freeing or discarding more than 1 variable.

For example,

         C.discard(n');
         C.discard(nrhs');

So if I discard n' only, everything is fine, but if I discard both n'  
AND nhrs' then I get a bus error.  Both variables are allocated in  
the exact same way using :

n' = C.new C.T.slong
nrhs' = C.new C.T.slong

Could this be a bug in nlffi, or am I doing something silly ?

I am assuming that if I don't discard, or free in the case of lower  
level allocs, I'm going to end up with a memory leak, right ?  This  
memory is not being allocated from the SML heap, is it ?

Thanks

Brian



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.