memtt / malt

MALT is a MALloc Tracker to find where and how your made your memory allocations in C/C++/Fortran applications.
https://memtt.github.io/malt/
Other
106 stars 15 forks source link

Look for porting the profiler on MacOSX #64

Open svalat opened 2 years ago

svalat commented 2 years ago

As asked for issue #61 we might want to port the profiler on MacOSX.

As stated the first comment on this issue the required checks and possibly porting would be:

  1. About the spinlock: yes pthread_spinlock_t is not provided under macosx. I have an equivalent here which can be imported in MALT with a bit of work: https://gitlab.cern.ch/lhcb-online-eb/lhcb-daqpipe-v2/-/blob/master/src/portability/SpinlockPthread.hpp. I don't know if it is still supported by recent macrosx. Another solution a bit less performance is to replace them by pthread mutex.
  2. I think there are some other points which might lead to issues on macosx. It would be nice if you can confirm to me. Mostly there might be an issue because I use some files in /proc (/proc/self/maps, /proc/meminfo, /proc/self/statm, /proc/self/exe). Are they available on osx ?

Originally posted by @svalat in https://github.com/memtt/malt/issues/61#issuecomment-878939276