Don't run out of memory from boxing objects in FFI
parent
5c637e05f3
commit
3b2b86e1a2
|
@ -1,4 +1,3 @@
|
|||
- out of memory from ffi calls
|
||||
- update amd64 for %unbox-struct and callbacks
|
||||
- clean up C stack frame assembly code to avoid moving spilled arguments
|
||||
twice
|
||||
|
|
|
@ -64,4 +64,4 @@ M: alien-callback-error summary ( error -- )
|
|||
] make-linear ;
|
||||
|
||||
M: alien-callback linearize* ( node -- )
|
||||
dup linearize-callback linearize-next ;
|
||||
compile-gc dup linearize-callback linearize-next ;
|
||||
|
|
|
@ -70,6 +70,7 @@ M: alien-invoke-error summary ( error -- )
|
|||
] if ;
|
||||
|
||||
M: alien-invoke linearize* ( node -- )
|
||||
compile-gc
|
||||
dup alien-invoke-parameters objects>registers
|
||||
dup alien-invoke-dlsym %alien-invoke ,
|
||||
dup linearize-cleanup
|
||||
|
|
|
@ -59,3 +59,5 @@ kernel-internals math namespaces sequences words ;
|
|||
|
||||
: if-void ( type true false -- | false: type -- )
|
||||
pick "void" = [ drop nip call ] [ nip call ] if ; inline
|
||||
|
||||
: compile-gc "maybe_gc" f %alien-invoke , ;
|
||||
|
|
|
@ -121,5 +121,5 @@ INLINE void* allot_object(CELL type, CELL length)
|
|||
CELL collect_next(CELL scan);
|
||||
void garbage_collection(CELL gen);
|
||||
void primitive_gc(void);
|
||||
void maybe_gc(CELL size);
|
||||
DLLEXPORT void maybe_gc(CELL size);
|
||||
void primitive_gc_time(void);
|
||||
|
|
Loading…
Reference in New Issue