[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

X11 - foreign function interface



I have some c-functions that use X11 widgets.
My testcases work fine in a C program.
Using the same test data, but calling the C functions
from Lisp, gets "cannot perform calloc" or "cannot perform realloc"
after a small "random" number of repetitions.  The same test data
sometimes works and sometimes fails.

I've read the storage allocation and garbage collection section
of the Allegro User Guide and understand that "C space" is not
affected by garbage collection, but the allocation of "new space"
is affected by "C space".  From the diagrams, I get the impression
that "C space" is surrounded by "new space" and "old space" and
maybe this explains why (or perhaps this is a naive misunderstanding)
I might run out of "C space".  Is that why I can't do a malloc?

By the way, I'm not doing anything in Lisp between my foreign
function calls except creating some small arrays that I pass
to the foreign functions.  

Is the size of C space somehow fixed by Allegro?  How does it get bigger?
Any hints or explanations will be appreciated...