[nem-bug] [Nemerle 0000611]: heap class does not recover memory
when its no longer used
feedback at nemerle.org
feedback at nemerle.org
Sat Feb 4 02:30:45 CET 2006
A NOTE has been added to this issue.
======================================================================
<http://nemerle.org/bugs/view.php?id=611>
======================================================================
Reported By: user317
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 611
Category: The Standard Library
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 02-03-2006 22:30 CET
Last Modified: 02-04-2006 02:30 CET
======================================================================
Summary: heap class does not recover memory when its no
longer used
Description:
I am not sure if its a bug in mono, but the following code takes up about
200mb of memory, even after the heap is no longer used.
======================================================================
----------------------------------------------------------------------
user317 - 02-04-06 02:30
----------------------------------------------------------------------
similar problem with a list, although it looks like it does recover some
memory, since it doesnt grow as much as it would if it didn't. Rand also
breaks after 3mil accesses.
using Nemerle.Collections;
using Nemerle.Collections.List;
using Nemerle.IO;
using Nemerle.Text;
using System;
using System.IO;
def test(times) {
mutable ll = [];
mutable time = DateTime.Now;
for(mutable ii = 0; ii<times; ii++) {
ll = ii::ll;
when(ii%100000 == 0) {
print("$((DateTime.Now - time).TotalSeconds) \n");
time = DateTime.Now;
}
}
ll = [];
GC.Collect();
}
test(10000000);
test(10000000);
test(10000000);
test(10000000);
test(10000000);
test(10000000);
test(10000000);
test(10000000);
test(10);
print("done\n");
GC.Collect();
while(true) {
System.Threading.Thread.Sleep(100);
}
Issue History
Date Modified Username Field Change
======================================================================
02-03-06 22:30 user317 New Issue
02-04-06 02:30 user317 Note Added: 0001069
======================================================================
More information about the bugs
mailing list