Diagnosing memory growth

Rob McDonald <[email protected]> Tue, 2 May 2023 12:20:31 -0700
Newsgroups gmane.comp.programming.swig
Message-ID <CAEppYpHg49uywrfcoD09yYTq6Sc3KQ7CDP79+AF03mZC3YRkfQ@mail.gmail.com>
I have a C++ application wrapped with Swig to Python.

Some of my users are seeing large and steady memory growth for extended
scripts that make repeated calls to the C++ side of things.

The non-Swig version of my program also has an embedded scripting
language.  If I recreate their Python calls with my scripting language, I
do not see the memory growth.  Therefore, I do not initially think the
memory leaks are inherent to my C++ code.

How can I go about tracking memory use (between a wrapped C++ API, Swig
middle-layer, and Python) from Python?  What sorts of diagnostic tools are
there for this?

I know that I can not run my C++ with Address Sanitizer or Valgrind under
Python without re-compiling Python with these things enabled (I would
really like to avoid compiling Python).

Thanks for any suggestions,

Rob

_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user