Next: iklib memory blocks, Previous: iklib memory alloc, Up: iklib memory [Index]
The following bindings are exported by the libraries (vicare)
and (vicare system $foreign)
and reexported by the library
(vicare ffi)
.
Interface to the C function memcpy()
, (libc)memcpy. Copy count bytes from the memory
referenced by the pointer src to the memory referenced by the
pointer dst; count must be an exact integer in the range of
the C language type size_t
. The two memory regions must not
overlap. Return unspecified values.
Interface to the C function memmove()
, (libc)memmove. Copy count bytes from the memory
referenced by the pointer src to the memory referenced by the
pointer dst; count must be an exact integer in the range of
the C language type size_t
. The two memory regions can be
overlapping. Return unspecified values.
Interface to the C function memset()
, (libc)memset.Set to value count bytes of the
memory referenced by the pointer ptr. count must be an
exact integer in the range of the C language type size_t
,
value must be an exact fixnum in the range [-128, 255].
Return unspecified values.
Interface to the C function memcmp()
, (libc)memcmp. Compare count bytes in the memory blocks
referenced by pointer1 and pointer2, return a fixnum
representing the classic comparison ternary result. count must be
an exact integer in the range of the C language type size_t
.
Copy count bytes from src starting at offset src.start to dst starting at offset dst.start. src and dst can be pointers or bytevectors; dst.start, src.start and count must be non–negative fixnums. The two memory regions must not overlap. Return unspecified values.
Build and return a new bytevector object holding number-of-bytes from the memory region starting at pointer. number-of-bytes must be a non–negative fixnum.
Allocate a new raw memory block and copy into it the contents of
bv. If successful return two values being the pointer object
referencing the memory and a fixnum representing the length of the
memory block; if allocation fails raise a non–continuable exception
with components: &who
, &message
,
&out-of-memory-error
.
Memory allocated by bytevector->memory
must be released by
free
; memory allocated by bytevector->guarded-memory
is
automatically released whenever the returned pointer object is garbage
collected.
Next: iklib memory blocks, Previous: iklib memory alloc, Up: iklib memory [Index]