Closed s-mandra closed 4 years ago
For other operating systems:
- Windows has
GetProcessMemoryInfo
.- Mac doesn't appear to have good support for this, although it seems like the UNIX
time
command may return the required info if you can get the PID.I'm okay with leaving these as TODO items for now as long as this doesn't cause the other OSes to crash when logging memory usage.
Fixed the code so that tracking is only enabled for linux
systems.
For some reasons, ualarm
doesn't work properly for track_memory_milliseconds >= 1000
. The problem doesn't appear for MacOSX
.
For some reasons,
ualarm
doesn't work properly fortrack_memory_milliseconds >= 1000
. The problem doesn't appear forMacOSX
.
It seems that actually ualarm
only accepts intervals smaller than 1 second.
For other operating systems:
- Windows has
GetProcessMemoryInfo
.- Mac doesn't appear to have good support for this, although it seems like the UNIX
time
command may return the required info if you can get the PID.I'm okay with leaving these as TODO items for now as long as this doesn't cause the other OSes to crash when logging memory usage.
It now works for both linux
and macOSX
. The portion of the code related to win64
is commented because not tested.
For now, it works for linux only. It uses
signal
s and/proc/self/status
, which are not available in neither Windows nor MacOSX. Any ideas?