register_segment_scanner

Function register_segment_scanner 

Source
pub fn register_segment_scanner(scanner: SegmentScannerFn)
Expand description

Register a segment scanner callback.

The scanner callback is called during RDMA segment registration to discover CUDA memory segments. The callback should fill the provided buffer with segment information and return the total count of segments found.

If the returned count exceeds the buffer size, the caller will allocate a larger buffer and retry.

Pass None to unregister the scanner.

ยงSafety

The provided callback function must be safe to call from C code and must properly handle the segment buffer.