Bug: Fix peak-memory estimation on MacOSX using XLALGetPeakHeapUsageMB()
XLALGetPeakHeapUsageMB() seems to be off by a factor of 1024 on OSX systems --of course! I've observed this myself on Arunava's machine, and there's also evidence online for this fact: https://stackoverflow.com/questions/40773924/units-of-ru-maxrss-on-bsd despite what the man page claims.
This throws off XLALGetPeakHeapUsageMB() which currently assumes kBytes as the units of getrusage.ru_maxrss, as the main page states. This might be worthwhile fixing by adding a #if MACOSX [or whatever the correct define would be] clause to adjust the units to be in Bytes instead. ie sth like
#ifdef MACOSX
peakHeapMB /= 1024;
#endif
Edited by Adam Mercer