memory consumption
Alexey
zen.supagood at gmail.com
Wed Mar 31 12:58:38 EDT 2021
среда, 31 марта 2021 г. в 18:17:46 UTC+3, Dieter Maurer:
> Alexey wrote at 2021-3-31 02:43 -0700:
> >среда, 31 марта 2021 г. в 06:54:52 UTC+3, Inada Naoki:
> > ...
> >> You can get some hints from sys._debugmallocstats(). It prints
> >> obmalloc (allocator for small objects) stats to stderr.
> >> Try printing stats before and after 1st run, and after 2nd run. And
> >> post it in this thread if you can. (no sensible information in the
> >> stats).
> `glibc` has similar functions to monitor the memory allocation
> at the C level: `mallinfo[2]`, `malloc_stats`, `malloc_info`.
>
> The `mallinfo` functions can be called via `ctypes`.
> Provided your `glibc` has `mallinfo2`, I recommend its use.
>
> In order to use `malloc_info` from Python, you need
> a C extension. I have one implemented via `cython`. Let me know,
> if you are interested.
I think I found something. I'll return tomorrow with update.
More information about the Python-list
mailing list