[cffi-devel] [PATCH] 64-bit support for Allegro, and allocate stack objects in the static area
Luís Oliveira
luismbo at gmail.com
Fri Jan 9 02:31:03 UTC 2009
On Fri, Jan 9, 2009 at 2:02 AM, John Fremlin <jf at msi.co.jp> wrote:
> Why do you still need the
>
> (cond ((and (constantp size) (<= (eval size) ff:*max-stack-fobject-bytes*))
>
> This was just to check whether the with-stack-fobject would actually
> allocate the thing on the stack (if it did not then we would have to
> free it by ourselves, and so we would not use with-stack-fobject at
> all).
>
> You can just use with-static-fobject for everything now and let Allegro
> decide whether it can allocate on the stack?
We still need it anyway because in order for stack allocation to occur
we can't pass the :SIZE argument, and the TYPE has to be constant.
Also, it seems that WITH-STATIC-FOBJECT is not enforcing
FF:*MAX-STACK-FOBJECT-BYTES* so we probably should do that ourselves.
--
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/
More information about the cffi-devel
mailing list