Provide some small utilty functions for trying to monitor memory use.
Try to read the number of kilobytes in use currently from /proc/self/status and return number of bits in use. Will return negative if error encountered. This gets VmHWM.
Try to read the peak number of kilobytes currently from /proc/self/status and return number of bits in use. Will return negative if error encountered. This gets VmRSS.
Try to read an integer from /proc/self/status. Returns negative if not possible to open file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | status_entry |
Converts the passed number of bits into a slightly more human readable form.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | bits |
Writes current estimate of memory use and peak memory use to provided unit.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in), | optional | :: | show_peak | ||
logical, | intent(in), | optional | :: | show_current | ||
integer, | intent(in), | optional | :: | unit |
Internal routine which can be used for debugging. Tries to dump the contents of /proc/self/status to output_unit