Memory ====== Tracked allocation, raw storage copies, borrowed array views and size inquiries. All routines are available through ``use futile``. .. rubric:: Borrowed views and raw copies .. list-table:: :header-rows: 1 :widths: 25 75 :class: api-summary * - Routine - Description * - :doc:`f_subptr` - Borrowed rank-one pointer view into existing contiguous storage, without copying. * - :doc:`f_subptr_str` - Borrowed rank-one ``character(len=1)`` view counting characters, not string elements. * - :doc:`f_memcpy` - Raw storage copy, with ``n`` counting source elements; overlap-safe. * - :doc:`f_memcpy_bytes` - Raw storage copy between scalar buffer starts with an explicit byte count. .. rubric:: Size inquiries and binding buffers .. list-table:: :header-rows: 1 :widths: 25 75 :class: api-summary * - Routine - Description * - :doc:`f_size` - Number of elements, as ``integer(f_size_t)``, without element access. * - :doc:`f_sizeof` - Payload storage in C bytes, as ``integer(f_size_t)``, without element access. * - :doc:`f_dump_buffer` - Binding-owned character dump buffer (C ``f90_f_dump_buffer_*``, C++ ``FDumpBuffer``). .. rubric:: Allocation and comparison These interfaces are described on the :doc:`/memory` page. .. list-table:: :header-rows: 1 :widths: 25 75 :class: api-summary * - 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. .. toctree:: :hidden: f_subptr f_subptr_str f_memcpy f_memcpy_bytes f_size f_sizeof f_dump_buffer /memory