[Issue 9094] New: GC not collecting under Windows
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 28 11:05:39 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9094
Summary: GC not collecting under Windows
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: druntime
AssignedTo: nobody at puremagic.com
ReportedBy: acehreli at yahoo.com
--- Comment #0 from Ali Cehreli <acehreli at yahoo.com> 2012-11-28 11:05:36 PST ---
Have a 1G file named "one_gigabyte_file". You can use the following program to
create it:
import std.stdio;
void foo()
{
auto file = File("one_gigabyte_file", "w");
auto data = new ubyte[](100 * 1024 * 1024);
foreach (i; 0 .. 10) {
file.rawWrite(data);
}
}
void main()
{
foo();
}
Then, run the following program:
import std.stdio;
void foo()
{
auto file = File("one_gigabyte_file", "r");
auto data = new ubyte[](100 * 1024 * 1024);
foreach (i; 0 .. 10) {
file.rawRead(data);
}
}
void main()
{
for (size_t i; true; ++i) {
writeln(i);
foo();
}
}
The problem is, the memory consumption of the program grows continuously until
it is terminated by core.exception.OutOfMemoryError.
We don't see this issue under Linux.
Thank you,
Ali
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list