Module pmem::ptr [] [src]

The functions in this section provide optimized copying to persistent memory

The copy, copy_nooverlapping, and write_bytes, provide the same memory copying as memmove(3), memcpy(3), and memset(3), and ensure that the result has been flushed to persistence before returning.

Warning: Using these functions where is_pmem(1) returns false may not do anything useful. Use the normal libc functions in that case.

Functions

copy

Copies count * size_of<T> bytes from src to pmemdest. The source and destination may overlap.

copy_nooverlapping

Copies count * size_of<T> bytes from src to pmemdest. The source and destination may not overlap.

write_bytes

Invokes memset on the specified pointer, setting count * size_of::<T>() bytes of memory starting at pmemdest to val.