Function std::intrinsics::volatile_set_memory[][src]

pub unsafe extern "rust-intrinsic" fn volatile_set_memory<T>(
    dst: *mut T,
    val: u8,
    count: usize
)
🔬 This is a nightly-only experimental API. (core_intrinsics)

intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library

Expand description

等效于适当的 llvm.memset.p0i8.* 内联函数,其大小为 count* size_of::<T>(),并且对齐方式为 min_align_of::<T>()

volatile 参数设置为 true,因此除非大小等于零,否则不会对其进行优化。

此内联函数没有稳定的对应对象。