NAFPack_memory_monitor.f90 Source File


Files dependent on this one

sourcefile~~nafpack_memory_monitor.f90~~AfferentGraph sourcefile~nafpack_memory_monitor.f90 NAFPack_memory_monitor.f90 sourcefile~nafpack_iterative_methods.f90 NAFPack_Iterative_methods.f90 sourcefile~nafpack_iterative_methods.f90->sourcefile~nafpack_memory_monitor.f90 sourcefile~nafpack_linalg.f90 NAFPack_linalg.f90 sourcefile~nafpack_linalg.f90->sourcefile~nafpack_iterative_methods.f90

Source Code

module NAFPack_memory_monitor

    implicit none(type, external)

    private

    public :: get_memory_kb

    interface
        function get_memory_usage() bind(C, name="get_memory_usage") result(mem_usage)
            use iso_c_binding, only: c_int
            implicit none(type, external)
            integer(c_int) :: mem_usage
        end function get_memory_usage
    end interface

contains

    function get_memory_kb() result(memory_kb)
        integer :: memory_kb

        memory_kb = get_memory_usage()

    end function get_memory_kb

end module NAFPack_memory_monitor