[cffi-devel] Memory limit when using with-foreign-pointer?
Luís Oliveira
luismbo at gmail.com
Tue Feb 8 22:54:05 UTC 2011
On Tue, Feb 8, 2011 at 5:51 AM, Carlo Hamalainen
<carlo.hamalainen at gmail.com> wrote:
> ; Attempt to malloc 100Mb of memory and say hello
> (with-foreign-pointer (data (* 100 1048576 (foreign-type-size :char)))
> (print "hello"))
WITH-FOREIGN-POINTER expands to WITH-ALIEN on SBCL, which performs
stack allocation.
> But when I run it using SBCL on Ubuntu 10.10 32bit, it complains about
> some value not being of type (MOD 536870909). Is this a deliberate
> limit on the part of CFFI or SBCL? If so where can I adjust this
> limit?
It's an SBCL limit (64 MB?). I don't know if you can adjust it but
someone on sbcl-devel should know. I'm surprised it's that big,
though. Shouldn't it be much smaller?
--
Luís Oliveira
http://r42.eu/~luis/
More information about the cffi-devel
mailing list