Memory increases when calling nanomaker in a for loop in order to simulate multiple files. This could be due to the fact that we are working with jitted ROOT.RDataFrame and jitted code is accumulated at each iteration. As suggested here a possible solution is to spawn a different process for each file.