Help with FFI - another try

nicolas cellier ncellier at ifrance.com
Mon Jul 24 12:01:49 UTC 2006


I retry sending since it failed...

----------  Message transmis  ----------
Subject: Re: Help with FFI - another try
Date: Vendredi 21 Juillet 2006 22:49
From: nicolas cellier <ncellier at ifrance.com>
To: The general-purpose Squeak developers list 
<squeak-dev at lists.squeakfoundation.org>

Le Vendredi 21 Juillet 2006 13:15, Eugene Beschastnov a écrit :
> I digged a little into C-code and found that hbeStream is pointer to
> some LAME data (some global flags are stored there). I suppose that
> root of problem is that this data is destroyed or moved between
> apicalls. Is there any way to avoid this?

One solution is to allocate this data on external heap.
(See ExternalAddress class>>allocate:) instead of using a ByteArray in
Smalltalk memory.

Of course, you'll have to free data yourself as in C.
Maybe the trick explained at http://bugs.impara.de/view.php?id=3692 that
should be in latest image can help...

Nicolas

-------------------------------------------------------




More information about the Squeak-dev mailing list