Next: , Previous: , Up: libffi   [Index]


3 Memory Usage

Note that memory allocated by ffi_closure_alloc and freed by ffi_closure_free does not come from the same general pool of memory that malloc and free use. To accomodate security settings, libffi may aquire memory, for example, by mapping temporary files into multiple places in the address space (once to write out the closure, a second to execute it). The search follows this list, using the first that works:

If security settings prohibit using any of these for closures, ffi_closure_alloc will fail.