memray icon indicating copy to clipboard operation
memray copied to clipboard

Suppressing functions

Open ZeroIntensity opened this issue 1 year ago • 0 comments
trafficstars

Is there an existing proposal for this?

  • [X] I have searched the existing proposals

Is your feature request related to a problem?

Python comes with several built-in "memory leaks" (for example, re.compile, from your docs), making it difficult to write code that doesn't get marked by Memray as leaking memory in some way or another.

Describe the solution you'd like

Memray could support adding a suppressions file. This could be in an ini file (since that's in the standard library), or make its own format - similar to how Valgrind does it.

Alternatives you considered

I've considered modifying get_allocations to manually remove some functions from the report.

ZeroIntensity avatar Jun 08 '24 16:06 ZeroIntensity