mirror of https://github.com/ceph/go-ceph
780f7014a2
Since Go 1.21 there is a runtime.Pinner API that allows to safely pass structures with embedded Go pointers to C code. In earlier Go version we know that the garbage collector is non-moving, so it is safe to pass Go pointers to C as well. This change adds two implementations of PtrGuard, one for pre 1.21 that is basically a no-op, and one for 1.21+ that uses runtime.Pinner. Signed-off-by: Sven Anderson <sven@redhat.com> |
||
---|---|---|
.. | ||
aliases.go | ||
buffergroup.go | ||
buffergroup_test.go | ||
command_input.go | ||
command_input_test.go | ||
command_output.go | ||
command_output_test.go | ||
cslice.go | ||
cslice_test.go | ||
iovec.go | ||
iovec_test.go | ||
ptrguard.go | ||
ptrguard_pinner.go | ||
ptrguard_test.go | ||
splitbuf.go | ||
splitbuf_test.go | ||
sync_buffer.go | ||
sync_buffer_memcpy.go | ||
sync_buffer_test.go |