mirror of
https://github.com/ceph/go-ceph
synced 2024-12-18 20:35:33 +00:00
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_test.go | ||
buffergroup.go | ||
command_input_test.go | ||
command_input.go | ||
command_output_test.go | ||
command_output.go | ||
cslice_test.go | ||
cslice.go | ||
iovec_test.go | ||
iovec.go | ||
ptrguard_pinner.go | ||
ptrguard_test.go | ||
ptrguard.go | ||
splitbuf_test.go | ||
splitbuf.go | ||
sync_buffer_memcpy.go | ||
sync_buffer_test.go | ||
sync_buffer.go |