Memory#

Tracked allocation, raw storage copies, borrowed array views and size inquiries. All routines are available through use futile.

Borrowed views and raw copies

Routine

Description

f_subptr

Borrowed rank-one pointer view into existing contiguous storage, without copying.

f_subptr_str

Borrowed rank-one character(len=1) view counting characters, not string elements.

f_memcpy

Raw storage copy, with n counting source elements; overlap-safe.

f_memcpy_bytes

Raw storage copy between scalar buffer starts with an explicit byte count.

Size inquiries and binding buffers

Routine

Description

f_size

Number of elements, as integer(f_size_t), without element access.

f_sizeof

Payload storage in C bytes, as integer(f_size_t), without element access.

f_dump_buffer

Binding-owned character dump buffer (C f90_f_dump_buffer_*, C++ FDumpBuffer).

Allocation and comparison

These interfaces are described on the Memory handling page.

Routine

Description

f_malloc / f_free

Tracked allocation and deallocation of allocatable arrays.

f_malloc_ptr / f_free_ptr

Tracked allocation and deallocation of pointer arrays, including aligned pointers.

f_maxdiff

Maximum absolute difference between two buffers.