Re: Ram memory not freed after executing python script on ubuntu system (rmlibre)

2020-05-29 Thread Peter J. Holzer
On 2020-05-29 14:28:59 +0900, Inada Naoki wrote: > pymalloc manages only small blocks of memory. > Large (more than 512 byte) memory blocks are managed by malloc/free. > > glibc malloc doesn't return much freed memory to OS. That depends on what "much" means. Glibc does return blocks to the OS w

Re: Ram memory not freed after executing python script on ubuntu system (rmlibre)

2020-05-28 Thread Inada Naoki
pymalloc manages only small blocks of memory. Large (more than 512 byte) memory blocks are managed by malloc/free. glibc malloc doesn't return much freed memory to OS. You can try jemalloc instead of glibc. On Ubuntu 20.04, you can try it by: LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so

Re: Ram memory not freed after executing python script on ubuntu system (rmlibre)

2020-05-28 Thread Dieter Maurer
rmli...@riseup.net wrote at 2020-5-28 18:56 -0700: >We just ran into this problem when running our aiootp package's memory >hard password hashing function (https://github.com/rmlibre/aiootp/). The >memory was not being cleared after the function finished running but the >script was still live. I h

Re: Ram memory not freed after executing python script on ubuntu system (rmlibre)

2020-05-28 Thread Chris Angelico
On Fri, May 29, 2020 at 12:08 PM wrote: > > > We just ran into this problem when running our aiootp package's memory > hard password hashing function (https://github.com/rmlibre/aiootp/). Have you considered implementing that module in something else? Try Cythonizing it and see if suddenly your m

Re: Ram memory not freed after executing python script on ubuntu system (rmlibre)

2020-05-28 Thread rmlibre
We just ran into this problem when running our aiootp package's memory hard password hashing function (https://github.com/rmlibre/aiootp/). The memory was not being cleared after the function finished running but the script was still live. We tried making sure everything went out of scope and del