Did just a short test. And I am a bit surprised with default GC: I added to 
your code
    
    
    echo a.len
    echo getTotalMem()
    echo getOccupiedMem()
    echo getFreeMem()
    a = @[]
    GC_Fullcollect()
    echo getTotalMem()
    echo getOccupiedMem()
    echo getFreeMem()
    sleep(10000)
    GC_Fullcollect()
    echo getTotalMem()
    echo getOccupiedMem()
    echo getFreeMem()
    
    
    Run

and got output
    
    
    10
    3695615464
    1743472784
    1952124928
    3695615464
    1743454704
    1952137216
    3695615464
    1743454920
    1952137216
    
    
    Run

So it seems that GC does not give mem back to OS. I think that is intended, but 
may not be that what we desire in all cases.

Reply via email to