get_memory_info Subroutine

public subroutine get_memory_info(mem_free, mem_total)

Get the current CPU-memory status.

Note

Currently implemented only per Unix/Linux based systems. Return -1 if failing.

Arguments

Type IntentOptional Attributes Name
integer(kind=I8P), intent(out) :: mem_free

Free memory.

integer(kind=I8P), intent(out) :: mem_total

Total memory.


Calls

proc~~get_memory_info~~CallsGraph proc~get_memory_info get_memory_info interface~cton cton proc~get_memory_info->interface~cton proc~ctoi_i1p ctoi_I1P interface~cton->proc~ctoi_i1p proc~ctoi_i2p ctoi_I2P interface~cton->proc~ctoi_i2p proc~ctoi_i4p ctoi_I4P interface~cton->proc~ctoi_i4p proc~ctoi_i8p ctoi_I8P interface~cton->proc~ctoi_i8p proc~ctor_r4p ctor_R4P interface~cton->proc~ctor_r4p proc~ctor_r8p ctor_R8P interface~cton->proc~ctor_r8p

Called by

proc~~get_memory_info~~CalledByGraph proc~get_memory_info get_memory_info proc~alloc_var_i1p_1d alloc_var_I1P_1D proc~alloc_var_i1p_1d->proc~get_memory_info proc~alloc_var_i1p_2d alloc_var_I1P_2D proc~alloc_var_i1p_2d->proc~get_memory_info proc~alloc_var_i1p_3d alloc_var_I1P_3D proc~alloc_var_i1p_3d->proc~get_memory_info proc~alloc_var_i1p_4d alloc_var_I1P_4D proc~alloc_var_i1p_4d->proc~get_memory_info proc~alloc_var_i1p_5d alloc_var_I1P_5D proc~alloc_var_i1p_5d->proc~get_memory_info proc~alloc_var_i1p_6d alloc_var_I1P_6D proc~alloc_var_i1p_6d->proc~get_memory_info proc~alloc_var_i1p_7d alloc_var_I1P_7D proc~alloc_var_i1p_7d->proc~get_memory_info proc~alloc_var_i2p_1d alloc_var_I2P_1D proc~alloc_var_i2p_1d->proc~get_memory_info proc~alloc_var_i2p_2d alloc_var_I2P_2D proc~alloc_var_i2p_2d->proc~get_memory_info proc~alloc_var_i2p_3d alloc_var_I2P_3D proc~alloc_var_i2p_3d->proc~get_memory_info proc~alloc_var_i2p_4d alloc_var_I2P_4D proc~alloc_var_i2p_4d->proc~get_memory_info proc~alloc_var_i2p_5d alloc_var_I2P_5D proc~alloc_var_i2p_5d->proc~get_memory_info proc~alloc_var_i2p_6d alloc_var_I2P_6D proc~alloc_var_i2p_6d->proc~get_memory_info proc~alloc_var_i2p_7d alloc_var_I2P_7D proc~alloc_var_i2p_7d->proc~get_memory_info proc~alloc_var_i4p_1d alloc_var_I4P_1D proc~alloc_var_i4p_1d->proc~get_memory_info proc~alloc_var_i4p_2d alloc_var_I4P_2D proc~alloc_var_i4p_2d->proc~get_memory_info proc~alloc_var_i4p_3d alloc_var_I4P_3D proc~alloc_var_i4p_3d->proc~get_memory_info proc~alloc_var_i4p_4d alloc_var_I4P_4D proc~alloc_var_i4p_4d->proc~get_memory_info proc~alloc_var_i4p_5d alloc_var_I4P_5D proc~alloc_var_i4p_5d->proc~get_memory_info proc~alloc_var_i4p_6d alloc_var_I4P_6D proc~alloc_var_i4p_6d->proc~get_memory_info proc~alloc_var_i4p_7d alloc_var_I4P_7D proc~alloc_var_i4p_7d->proc~get_memory_info proc~alloc_var_i8p_1d alloc_var_I8P_1D proc~alloc_var_i8p_1d->proc~get_memory_info proc~alloc_var_i8p_2d alloc_var_I8P_2D proc~alloc_var_i8p_2d->proc~get_memory_info proc~alloc_var_i8p_3d alloc_var_I8P_3D proc~alloc_var_i8p_3d->proc~get_memory_info proc~alloc_var_i8p_4d alloc_var_I8P_4D proc~alloc_var_i8p_4d->proc~get_memory_info proc~alloc_var_i8p_5d alloc_var_I8P_5D proc~alloc_var_i8p_5d->proc~get_memory_info proc~alloc_var_i8p_6d alloc_var_I8P_6D proc~alloc_var_i8p_6d->proc~get_memory_info proc~alloc_var_i8p_7d alloc_var_I8P_7D proc~alloc_var_i8p_7d->proc~get_memory_info proc~alloc_var_r16p_1d alloc_var_R16P_1D proc~alloc_var_r16p_1d->proc~get_memory_info proc~alloc_var_r16p_2d alloc_var_R16P_2D proc~alloc_var_r16p_2d->proc~get_memory_info proc~alloc_var_r16p_3d alloc_var_R16P_3D proc~alloc_var_r16p_3d->proc~get_memory_info proc~alloc_var_r16p_4d alloc_var_R16P_4D proc~alloc_var_r16p_4d->proc~get_memory_info proc~alloc_var_r16p_5d alloc_var_R16P_5D proc~alloc_var_r16p_5d->proc~get_memory_info proc~alloc_var_r16p_6d alloc_var_R16P_6D proc~alloc_var_r16p_6d->proc~get_memory_info proc~alloc_var_r16p_7d alloc_var_R16P_7D proc~alloc_var_r16p_7d->proc~get_memory_info proc~alloc_var_r4p_1d alloc_var_R4P_1D proc~alloc_var_r4p_1d->proc~get_memory_info proc~alloc_var_r4p_2d alloc_var_R4P_2D proc~alloc_var_r4p_2d->proc~get_memory_info proc~alloc_var_r4p_3d alloc_var_R4P_3D proc~alloc_var_r4p_3d->proc~get_memory_info proc~alloc_var_r4p_4d alloc_var_R4P_4D proc~alloc_var_r4p_4d->proc~get_memory_info proc~alloc_var_r4p_5d alloc_var_R4P_5D proc~alloc_var_r4p_5d->proc~get_memory_info proc~alloc_var_r4p_6d alloc_var_R4P_6D proc~alloc_var_r4p_6d->proc~get_memory_info proc~alloc_var_r4p_7d alloc_var_R4P_7D proc~alloc_var_r4p_7d->proc~get_memory_info proc~alloc_var_r8p_1d alloc_var_R8P_1D proc~alloc_var_r8p_1d->proc~get_memory_info proc~alloc_var_r8p_2d alloc_var_R8P_2D proc~alloc_var_r8p_2d->proc~get_memory_info proc~alloc_var_r8p_3d alloc_var_R8P_3D proc~alloc_var_r8p_3d->proc~get_memory_info proc~alloc_var_r8p_4d alloc_var_R8P_4D proc~alloc_var_r8p_4d->proc~get_memory_info proc~alloc_var_r8p_5d alloc_var_R8P_5D proc~alloc_var_r8p_5d->proc~get_memory_info proc~alloc_var_r8p_6d alloc_var_R8P_6D proc~alloc_var_r8p_6d->proc~get_memory_info proc~alloc_var_r8p_7d alloc_var_R8P_7D proc~alloc_var_r8p_7d->proc~get_memory_info proc~save_memory_status save_memory_status proc~save_memory_status->proc~get_memory_info interface~allocate_variable allocate_variable interface~allocate_variable->proc~alloc_var_i1p_1d interface~allocate_variable->proc~alloc_var_i1p_2d interface~allocate_variable->proc~alloc_var_i1p_3d interface~allocate_variable->proc~alloc_var_i1p_4d interface~allocate_variable->proc~alloc_var_i1p_5d interface~allocate_variable->proc~alloc_var_i1p_6d interface~allocate_variable->proc~alloc_var_i1p_7d interface~allocate_variable->proc~alloc_var_i2p_1d interface~allocate_variable->proc~alloc_var_i2p_2d interface~allocate_variable->proc~alloc_var_i2p_3d interface~allocate_variable->proc~alloc_var_i2p_4d interface~allocate_variable->proc~alloc_var_i2p_5d interface~allocate_variable->proc~alloc_var_i2p_6d interface~allocate_variable->proc~alloc_var_i2p_7d interface~allocate_variable->proc~alloc_var_i4p_1d interface~allocate_variable->proc~alloc_var_i4p_2d interface~allocate_variable->proc~alloc_var_i4p_3d interface~allocate_variable->proc~alloc_var_i4p_4d interface~allocate_variable->proc~alloc_var_i4p_5d interface~allocate_variable->proc~alloc_var_i4p_6d interface~allocate_variable->proc~alloc_var_i4p_7d interface~allocate_variable->proc~alloc_var_i8p_1d interface~allocate_variable->proc~alloc_var_i8p_2d interface~allocate_variable->proc~alloc_var_i8p_3d interface~allocate_variable->proc~alloc_var_i8p_4d interface~allocate_variable->proc~alloc_var_i8p_5d interface~allocate_variable->proc~alloc_var_i8p_6d interface~allocate_variable->proc~alloc_var_i8p_7d interface~allocate_variable->proc~alloc_var_r4p_1d interface~allocate_variable->proc~alloc_var_r4p_2d interface~allocate_variable->proc~alloc_var_r4p_3d interface~allocate_variable->proc~alloc_var_r4p_4d interface~allocate_variable->proc~alloc_var_r4p_5d interface~allocate_variable->proc~alloc_var_r4p_6d interface~allocate_variable->proc~alloc_var_r4p_7d interface~allocate_variable->proc~alloc_var_r8p_1d interface~allocate_variable->proc~alloc_var_r8p_2d interface~allocate_variable->proc~alloc_var_r8p_3d interface~allocate_variable->proc~alloc_var_r8p_4d interface~allocate_variable->proc~alloc_var_r8p_5d interface~allocate_variable->proc~alloc_var_r8p_6d interface~allocate_variable->proc~alloc_var_r8p_7d proc~assign_allocatable_i1p_1d assign_allocatable_I1P_1D proc~assign_allocatable_i1p_1d->interface~allocate_variable proc~assign_allocatable_i1p_2d assign_allocatable_I1P_2D proc~assign_allocatable_i1p_2d->interface~allocate_variable proc~assign_allocatable_i1p_3d assign_allocatable_I1P_3D proc~assign_allocatable_i1p_3d->interface~allocate_variable proc~assign_allocatable_i1p_4d assign_allocatable_I1P_4D proc~assign_allocatable_i1p_4d->interface~allocate_variable proc~assign_allocatable_i1p_5d assign_allocatable_I1P_5D proc~assign_allocatable_i1p_5d->interface~allocate_variable proc~assign_allocatable_i1p_6d assign_allocatable_I1P_6D proc~assign_allocatable_i1p_6d->interface~allocate_variable proc~assign_allocatable_i1p_7d assign_allocatable_I1P_7D proc~assign_allocatable_i1p_7d->interface~allocate_variable proc~assign_allocatable_i2p_1d assign_allocatable_I2P_1D proc~assign_allocatable_i2p_1d->interface~allocate_variable proc~assign_allocatable_i2p_2d assign_allocatable_I2P_2D proc~assign_allocatable_i2p_2d->interface~allocate_variable proc~assign_allocatable_i2p_3d assign_allocatable_I2P_3D proc~assign_allocatable_i2p_3d->interface~allocate_variable proc~assign_allocatable_i2p_4d assign_allocatable_I2P_4D proc~assign_allocatable_i2p_4d->interface~allocate_variable proc~assign_allocatable_i2p_5d assign_allocatable_I2P_5D proc~assign_allocatable_i2p_5d->interface~allocate_variable proc~assign_allocatable_i2p_6d assign_allocatable_I2P_6D proc~assign_allocatable_i2p_6d->interface~allocate_variable proc~assign_allocatable_i2p_7d assign_allocatable_I2P_7D proc~assign_allocatable_i2p_7d->interface~allocate_variable proc~assign_allocatable_i4p_1d assign_allocatable_I4P_1D proc~assign_allocatable_i4p_1d->interface~allocate_variable proc~assign_allocatable_i4p_2d assign_allocatable_I4P_2D proc~assign_allocatable_i4p_2d->interface~allocate_variable proc~assign_allocatable_i4p_3d assign_allocatable_I4P_3D proc~assign_allocatable_i4p_3d->interface~allocate_variable proc~assign_allocatable_i4p_4d assign_allocatable_I4P_4D proc~assign_allocatable_i4p_4d->interface~allocate_variable proc~assign_allocatable_i4p_5d assign_allocatable_I4P_5D proc~assign_allocatable_i4p_5d->interface~allocate_variable proc~assign_allocatable_i4p_6d assign_allocatable_I4P_6D proc~assign_allocatable_i4p_6d->interface~allocate_variable proc~assign_allocatable_i4p_7d assign_allocatable_I4P_7D proc~assign_allocatable_i4p_7d->interface~allocate_variable proc~assign_allocatable_i8p_1d assign_allocatable_I8P_1D proc~assign_allocatable_i8p_1d->interface~allocate_variable proc~assign_allocatable_i8p_2d assign_allocatable_I8P_2D proc~assign_allocatable_i8p_2d->interface~allocate_variable proc~assign_allocatable_i8p_3d assign_allocatable_I8P_3D proc~assign_allocatable_i8p_3d->interface~allocate_variable proc~assign_allocatable_i8p_4d assign_allocatable_I8P_4D proc~assign_allocatable_i8p_4d->interface~allocate_variable proc~assign_allocatable_i8p_5d assign_allocatable_I8P_5D proc~assign_allocatable_i8p_5d->interface~allocate_variable proc~assign_allocatable_i8p_6d assign_allocatable_I8P_6D proc~assign_allocatable_i8p_6d->interface~allocate_variable proc~assign_allocatable_i8p_7d assign_allocatable_I8P_7D proc~assign_allocatable_i8p_7d->interface~allocate_variable proc~assign_allocatable_r16p_1d assign_allocatable_R16P_1D proc~assign_allocatable_r16p_1d->interface~allocate_variable proc~assign_allocatable_r16p_2d assign_allocatable_R16P_2D proc~assign_allocatable_r16p_2d->interface~allocate_variable proc~assign_allocatable_r16p_3d assign_allocatable_R16P_3D proc~assign_allocatable_r16p_3d->interface~allocate_variable proc~assign_allocatable_r16p_4d assign_allocatable_R16P_4D proc~assign_allocatable_r16p_4d->interface~allocate_variable proc~assign_allocatable_r16p_5d assign_allocatable_R16P_5D proc~assign_allocatable_r16p_5d->interface~allocate_variable proc~assign_allocatable_r16p_6d assign_allocatable_R16P_6D proc~assign_allocatable_r16p_6d->interface~allocate_variable proc~assign_allocatable_r16p_7d assign_allocatable_R16P_7D proc~assign_allocatable_r16p_7d->interface~allocate_variable proc~assign_allocatable_r4p_1d assign_allocatable_R4P_1D proc~assign_allocatable_r4p_1d->interface~allocate_variable proc~assign_allocatable_r4p_2d assign_allocatable_R4P_2D proc~assign_allocatable_r4p_2d->interface~allocate_variable proc~assign_allocatable_r4p_3d assign_allocatable_R4P_3D proc~assign_allocatable_r4p_3d->interface~allocate_variable proc~assign_allocatable_r4p_4d assign_allocatable_R4P_4D proc~assign_allocatable_r4p_4d->interface~allocate_variable proc~assign_allocatable_r4p_5d assign_allocatable_R4P_5D proc~assign_allocatable_r4p_5d->interface~allocate_variable proc~assign_allocatable_r4p_6d assign_allocatable_R4P_6D proc~assign_allocatable_r4p_6d->interface~allocate_variable proc~assign_allocatable_r4p_7d assign_allocatable_R4P_7D proc~assign_allocatable_r4p_7d->interface~allocate_variable proc~assign_allocatable_r8p_1d assign_allocatable_R8P_1D proc~assign_allocatable_r8p_1d->interface~allocate_variable proc~assign_allocatable_r8p_2d assign_allocatable_R8P_2D proc~assign_allocatable_r8p_2d->interface~allocate_variable proc~assign_allocatable_r8p_3d assign_allocatable_R8P_3D proc~assign_allocatable_r8p_3d->interface~allocate_variable proc~assign_allocatable_r8p_4d assign_allocatable_R8P_4D proc~assign_allocatable_r8p_4d->interface~allocate_variable proc~assign_allocatable_r8p_5d assign_allocatable_R8P_5D proc~assign_allocatable_r8p_5d->interface~allocate_variable proc~assign_allocatable_r8p_6d assign_allocatable_R8P_6D proc~assign_allocatable_r8p_6d->interface~allocate_variable proc~assign_allocatable_r8p_7d assign_allocatable_R8P_7D proc~assign_allocatable_r8p_7d->interface~allocate_variable program~volatile_doctest~106 volatile_doctest program~volatile_doctest~106->interface~allocate_variable program~volatile_doctest~128 volatile_doctest program~volatile_doctest~128->interface~allocate_variable program~volatile_doctest~132 volatile_doctest program~volatile_doctest~132->interface~allocate_variable program~volatile_doctest~139 volatile_doctest program~volatile_doctest~139->interface~allocate_variable program~volatile_doctest~147 volatile_doctest program~volatile_doctest~147->interface~allocate_variable program~volatile_doctest~15 volatile_doctest program~volatile_doctest~15->interface~allocate_variable program~volatile_doctest~155 volatile_doctest program~volatile_doctest~155->interface~allocate_variable program~volatile_doctest~156 volatile_doctest program~volatile_doctest~156->interface~allocate_variable program~volatile_doctest~157 volatile_doctest program~volatile_doctest~157->interface~allocate_variable program~volatile_doctest~158 volatile_doctest program~volatile_doctest~158->interface~allocate_variable program~volatile_doctest~16 volatile_doctest program~volatile_doctest~16->interface~allocate_variable program~volatile_doctest~161 volatile_doctest program~volatile_doctest~161->interface~allocate_variable program~volatile_doctest~164 volatile_doctest program~volatile_doctest~164->interface~allocate_variable program~volatile_doctest~165 volatile_doctest program~volatile_doctest~165->interface~allocate_variable program~volatile_doctest~167 volatile_doctest program~volatile_doctest~167->interface~allocate_variable program~volatile_doctest~172 volatile_doctest program~volatile_doctest~172->interface~allocate_variable program~volatile_doctest~175 volatile_doctest program~volatile_doctest~175->interface~allocate_variable program~volatile_doctest~180 volatile_doctest program~volatile_doctest~180->interface~allocate_variable program~volatile_doctest~183 volatile_doctest program~volatile_doctest~183->interface~allocate_variable program~volatile_doctest~185 volatile_doctest program~volatile_doctest~185->interface~allocate_variable program~volatile_doctest~188 volatile_doctest program~volatile_doctest~188->interface~allocate_variable program~volatile_doctest~191 volatile_doctest program~volatile_doctest~191->interface~allocate_variable program~volatile_doctest~197 volatile_doctest program~volatile_doctest~197->interface~allocate_variable program~volatile_doctest~198 volatile_doctest program~volatile_doctest~198->interface~allocate_variable program~volatile_doctest~2 volatile_doctest program~volatile_doctest~2->interface~allocate_variable program~volatile_doctest~200 volatile_doctest program~volatile_doctest~200->interface~allocate_variable program~volatile_doctest~204 volatile_doctest program~volatile_doctest~204->interface~allocate_variable program~volatile_doctest~25 volatile_doctest program~volatile_doctest~25->interface~allocate_variable program~volatile_doctest~30 volatile_doctest program~volatile_doctest~30->interface~allocate_variable program~volatile_doctest~31 volatile_doctest program~volatile_doctest~31->interface~allocate_variable program~volatile_doctest~34 volatile_doctest program~volatile_doctest~34->interface~allocate_variable program~volatile_doctest~40 volatile_doctest program~volatile_doctest~40->interface~allocate_variable program~volatile_doctest~41 volatile_doctest program~volatile_doctest~41->interface~allocate_variable program~volatile_doctest~42 volatile_doctest program~volatile_doctest~42->interface~allocate_variable program~volatile_doctest~43 volatile_doctest program~volatile_doctest~43->interface~allocate_variable program~volatile_doctest~47 volatile_doctest program~volatile_doctest~47->interface~allocate_variable program~volatile_doctest~5 volatile_doctest program~volatile_doctest~5->interface~allocate_variable program~volatile_doctest~50 volatile_doctest program~volatile_doctest~50->interface~allocate_variable program~volatile_doctest~54 volatile_doctest program~volatile_doctest~54->interface~allocate_variable program~volatile_doctest~63 volatile_doctest program~volatile_doctest~63->interface~allocate_variable program~volatile_doctest~67 volatile_doctest program~volatile_doctest~67->interface~allocate_variable program~volatile_doctest~7 volatile_doctest program~volatile_doctest~7->interface~allocate_variable program~volatile_doctest~71 volatile_doctest program~volatile_doctest~71->interface~allocate_variable program~volatile_doctest~8 volatile_doctest program~volatile_doctest~8->interface~allocate_variable program~volatile_doctest~82 volatile_doctest program~volatile_doctest~82->interface~allocate_variable program~volatile_doctest~88 volatile_doctest program~volatile_doctest~88->interface~allocate_variable program~volatile_doctest~93 volatile_doctest program~volatile_doctest~93->interface~allocate_variable program~volatile_doctest~94 volatile_doctest program~volatile_doctest~94->interface~allocate_variable program~volatile_doctest~98 volatile_doctest program~volatile_doctest~98->interface~allocate_variable interface~assign_allocatable assign_allocatable interface~assign_allocatable->proc~assign_allocatable_i1p_1d interface~assign_allocatable->proc~assign_allocatable_i1p_2d interface~assign_allocatable->proc~assign_allocatable_i1p_3d interface~assign_allocatable->proc~assign_allocatable_i1p_4d interface~assign_allocatable->proc~assign_allocatable_i1p_5d interface~assign_allocatable->proc~assign_allocatable_i1p_6d interface~assign_allocatable->proc~assign_allocatable_i1p_7d interface~assign_allocatable->proc~assign_allocatable_i2p_1d interface~assign_allocatable->proc~assign_allocatable_i2p_2d interface~assign_allocatable->proc~assign_allocatable_i2p_3d interface~assign_allocatable->proc~assign_allocatable_i2p_4d interface~assign_allocatable->proc~assign_allocatable_i2p_5d interface~assign_allocatable->proc~assign_allocatable_i2p_6d interface~assign_allocatable->proc~assign_allocatable_i2p_7d interface~assign_allocatable->proc~assign_allocatable_i4p_1d interface~assign_allocatable->proc~assign_allocatable_i4p_2d interface~assign_allocatable->proc~assign_allocatable_i4p_3d interface~assign_allocatable->proc~assign_allocatable_i4p_4d interface~assign_allocatable->proc~assign_allocatable_i4p_5d interface~assign_allocatable->proc~assign_allocatable_i4p_6d interface~assign_allocatable->proc~assign_allocatable_i4p_7d interface~assign_allocatable->proc~assign_allocatable_i8p_1d interface~assign_allocatable->proc~assign_allocatable_i8p_2d interface~assign_allocatable->proc~assign_allocatable_i8p_3d interface~assign_allocatable->proc~assign_allocatable_i8p_4d interface~assign_allocatable->proc~assign_allocatable_i8p_5d interface~assign_allocatable->proc~assign_allocatable_i8p_6d interface~assign_allocatable->proc~assign_allocatable_i8p_7d interface~assign_allocatable->proc~assign_allocatable_r4p_1d interface~assign_allocatable->proc~assign_allocatable_r4p_2d interface~assign_allocatable->proc~assign_allocatable_r4p_3d interface~assign_allocatable->proc~assign_allocatable_r4p_4d interface~assign_allocatable->proc~assign_allocatable_r4p_5d interface~assign_allocatable->proc~assign_allocatable_r4p_6d interface~assign_allocatable->proc~assign_allocatable_r4p_7d interface~assign_allocatable->proc~assign_allocatable_r8p_1d interface~assign_allocatable->proc~assign_allocatable_r8p_2d interface~assign_allocatable->proc~assign_allocatable_r8p_3d interface~assign_allocatable->proc~assign_allocatable_r8p_4d interface~assign_allocatable->proc~assign_allocatable_r8p_5d interface~assign_allocatable->proc~assign_allocatable_r8p_6d interface~assign_allocatable->proc~assign_allocatable_r8p_7d program~volatile_doctest volatile_doctest program~volatile_doctest->interface~assign_allocatable program~volatile_doctest~100 volatile_doctest program~volatile_doctest~100->interface~assign_allocatable program~volatile_doctest~101 volatile_doctest program~volatile_doctest~101->interface~assign_allocatable program~volatile_doctest~102 volatile_doctest program~volatile_doctest~102->interface~assign_allocatable program~volatile_doctest~108 volatile_doctest program~volatile_doctest~108->interface~assign_allocatable program~volatile_doctest~110 volatile_doctest program~volatile_doctest~110->interface~assign_allocatable program~volatile_doctest~114 volatile_doctest program~volatile_doctest~114->interface~assign_allocatable program~volatile_doctest~117 volatile_doctest program~volatile_doctest~117->interface~assign_allocatable program~volatile_doctest~12 volatile_doctest program~volatile_doctest~12->interface~assign_allocatable program~volatile_doctest~120 volatile_doctest program~volatile_doctest~120->interface~assign_allocatable program~volatile_doctest~123 volatile_doctest program~volatile_doctest~123->interface~assign_allocatable program~volatile_doctest~129 volatile_doctest program~volatile_doctest~129->interface~assign_allocatable program~volatile_doctest~131 volatile_doctest program~volatile_doctest~131->interface~assign_allocatable program~volatile_doctest~134 volatile_doctest program~volatile_doctest~134->interface~assign_allocatable program~volatile_doctest~142 volatile_doctest program~volatile_doctest~142->interface~assign_allocatable program~volatile_doctest~144 volatile_doctest program~volatile_doctest~144->interface~assign_allocatable program~volatile_doctest~145 volatile_doctest program~volatile_doctest~145->interface~assign_allocatable program~volatile_doctest~146 volatile_doctest program~volatile_doctest~146->interface~assign_allocatable program~volatile_doctest~149 volatile_doctest program~volatile_doctest~149->interface~assign_allocatable program~volatile_doctest~153 volatile_doctest program~volatile_doctest~153->interface~assign_allocatable program~volatile_doctest~160 volatile_doctest program~volatile_doctest~160->interface~assign_allocatable program~volatile_doctest~166 volatile_doctest program~volatile_doctest~166->interface~assign_allocatable program~volatile_doctest~168 volatile_doctest program~volatile_doctest~168->interface~assign_allocatable program~volatile_doctest~169 volatile_doctest program~volatile_doctest~169->interface~assign_allocatable program~volatile_doctest~182 volatile_doctest program~volatile_doctest~182->interface~assign_allocatable program~volatile_doctest~189 volatile_doctest program~volatile_doctest~189->interface~assign_allocatable program~volatile_doctest~19 volatile_doctest program~volatile_doctest~19->interface~assign_allocatable program~volatile_doctest~192 volatile_doctest program~volatile_doctest~192->interface~assign_allocatable program~volatile_doctest~193 volatile_doctest program~volatile_doctest~193->interface~assign_allocatable program~volatile_doctest~199 volatile_doctest program~volatile_doctest~199->interface~assign_allocatable program~volatile_doctest~22 volatile_doctest program~volatile_doctest~22->interface~assign_allocatable program~volatile_doctest~23 volatile_doctest program~volatile_doctest~23->interface~assign_allocatable program~volatile_doctest~24 volatile_doctest program~volatile_doctest~24->interface~assign_allocatable program~volatile_doctest~28 volatile_doctest program~volatile_doctest~28->interface~assign_allocatable program~volatile_doctest~35 volatile_doctest program~volatile_doctest~35->interface~assign_allocatable program~volatile_doctest~37 volatile_doctest program~volatile_doctest~37->interface~assign_allocatable program~volatile_doctest~4 volatile_doctest program~volatile_doctest~4->interface~assign_allocatable program~volatile_doctest~44 volatile_doctest program~volatile_doctest~44->interface~assign_allocatable program~volatile_doctest~46 volatile_doctest program~volatile_doctest~46->interface~assign_allocatable program~volatile_doctest~52 volatile_doctest program~volatile_doctest~52->interface~assign_allocatable program~volatile_doctest~53 volatile_doctest program~volatile_doctest~53->interface~assign_allocatable program~volatile_doctest~56 volatile_doctest program~volatile_doctest~56->interface~assign_allocatable program~volatile_doctest~66 volatile_doctest program~volatile_doctest~66->interface~assign_allocatable program~volatile_doctest~69 volatile_doctest program~volatile_doctest~69->interface~assign_allocatable program~volatile_doctest~74 volatile_doctest program~volatile_doctest~74->interface~assign_allocatable program~volatile_doctest~78 volatile_doctest program~volatile_doctest~78->interface~assign_allocatable program~volatile_doctest~79 volatile_doctest program~volatile_doctest~79->interface~assign_allocatable program~volatile_doctest~83 volatile_doctest program~volatile_doctest~83->interface~assign_allocatable program~volatile_doctest~9 volatile_doctest program~volatile_doctest~9->interface~assign_allocatable

Source Code

   subroutine get_memory_info(mem_free, mem_total)
   !< Get the current CPU-memory status.
   !< @NOTE Currently implemented only per Unix/Linux based systems. Return -1 if failing.
   integer(I8P), intent(out) :: mem_free   !< Free memory.
   integer(I8P), intent(out) :: mem_total  !< Total memory.
   logical                   :: is_present !< Logical flag to check the presence of '/proc/meminfo' system file.
   integer(I4P)              :: file_unit  !< File unit.
   character(999)            :: line       !< Line buffer.

   mem_free  = -1_I8P
   mem_total = -1_I8P
   inquire(file='/proc/meminfo', exist=is_present)
   if (is_present) then
      open(newunit=file_unit, file='/proc/meminfo', status='old')
      read(file_unit, '(A)') line ! total memory
      call parse_line(l=line, v=mem_total)
      read(file_unit, '(A)') line ! free memory
      call parse_line(l=line, v=mem_free)
      close(file_unit)
   endif
   contains
      subroutine parse_line(l,v)
      !< Parse input line and return memory value.
      character(*), intent(in)  :: l      !< Input line.
      integer(I8P), intent(out) :: v      !< Memory value.
      integer(I4P)              :: colon  !< Index of colon (name/value separator) char in line.
      character(:), allocatable :: memval !< Memory value, string.

      colon = index(l, ':')                 ! find name/value separator position
      memval = trim(adjustl(l(colon+1:)))   ! get memory value, string
      memval = trim(memval(:len(memval)-2)) ! remove memory unit, e.g. kb
      v = cton(str=memval, knd=1_I8P)       ! cast to string to integer
      endsubroutine parse_line

   endsubroutine get_memory_info