Re: mp:process-run-function and a blocking foreign call
"Steven E. Harris" <[email protected]> Tue, 29 Nov 2005 16:37:31 -0800
| Newsgroups | gmane.lisp.allegro |
|---|---|
| Organization | SEH Labs |
| Message-ID | <[email protected]> |
Tapio Karras <[email protected]> writes: > To allow other MP process to run during the call, the FFI call needs > to release the Lisp heap. > > Look for the :release-heap keyword of def-foreign-call Thank you. That did it. I added the ":release-heap :when-ok" arguments to my def-foreign-call forms and all now works as expected. > The additional challenge is to allocate all FFI arguments in static > space, so that they don't get moved by the GC as a result of the > other MP processes running while the FFI call is in progress. I'm having a hard time understanding what the consequences are of using :foreign-static-gc as opposed to the default :foreign allocation. For now I went through my code and adapted it to accept an allocation option for passing on to all ff:allocate-fobject calls. However, I don't understand how to figure out /which/ FFI arguments actually need to be allocated in static space. -- Steven E. Harris