quantlab.factor.chunking.release_memory#
- quantlab.factor.chunking.release_memory()[source]#
Hand the heap memory freed by the last chunk back to the system.
glibc keeps freed blocks of a few tens of megabytes in the process heap, where fragmentation keeps them from being reused for the next chunk’s arrays, so without this the process grows by about a chunk per chunk. Does nothing outside Linux.
Examples
>>> release_memory()