Author vstinner
Recipients remi.lapeyre, ronaldoussoren, skrah, vstinner
Date 2020-06-10.13:40:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Would it be possible to wrap malloc_print_configure() ( in a context manager that we put in or to override

I don't see much benefit of having a feature which only works on macOS.

You can put a hook on memory allocations using PyMem_SetAllocator() to trigger any action you want when any memory allocation done by Python fails.

But is it really an use case to log any memory allocation failure? Python is very likely to raise a MemoryError exception in this case. It's well defined, no?
Date User Action Args
2020-06-10 13:40:53vstinnersetrecipients: + vstinner, ronaldoussoren, skrah, remi.lapeyre
2020-06-10 13:40:53vstinnersetmessageid: <>
2020-06-10 13:40:53vstinnerlinkissue40928 messages
2020-06-10 13:40:53vstinnercreate