[cffi-devel] WITH-FOREIGN-STRING allocates on heap?

Luís Oliveira luismbo at gmail.com
Fri Jun 20 07:13:17 UTC 2008


On Fri, Jun 20, 2008 at 5:21 AM, Hans Hübner <hans at huebner.org> wrote:
> is there a good reason why WITH-FOREIGN-STRING allocates the buffer on
> the heap instead of using WITH-FOREIGN-OBJECT, which will allocate on
> the stack on platforms that support it?

I believe we were worried about big strings and the possibility of
overflowing the stack. I suppose we could add an argument to
WITH-FOREIGN-STRING and :STRING to force stack allocation.

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/



More information about the cffi-devel mailing list