whitespacer added the comment:
pitrou, thanks for great diagnosing program! You are right that there is no
memory leak.
We have investigated this issue a little bit more - it looks real reason for
large memory consuming in the end is not fragmentation, just glibc doesn't
release all
New submission from whitespacer:
When pathlib mkdir is called with parents=True and some parent doesn't exists
it recursively calls self.parent.mkdir(parents=True) after catching OSError.
However after catching of OSError and before call to
self.parent.mkdir(parents=True) somebody els