Commit size and Page fault's very large for simple program
Hiemlick Hiemlicker via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jul 3 18:57:19 PDT 2016
version(Windows)
void main()
{
import std.random;
while(getchar() != EOF)
{
auto x = new int[std.random.uniform(1000000, 10000000)];
writeln("--------");
bThread.Now();
}
}
more or less, ends up with a huge amount of page faults and a
several hundred MB commit size(hold enter down a bit). I'm trying
to understand this. Is that normal behavior for normal
programs(haven't tried it with a similar C++ example though).
I realize the GC has to do some work and all that but the program
only has a working set of a few MB yet a commit of 10 times that.
Is commit size essentially "touched" memory but really doesn't
mean much to overall free ram?(can other programs use it at some
point)?
We know the program is not using more than 10MB of extra
memory(since x is local)... so I'd only expect the footprint to
be a max of around 15-20MB. not 150MB+(depends on how fast and
long you hit enter).
More information about the Digitalmars-d-learn
mailing list