Estimating free system resource at runtime

seany via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Aug 20 08:49:09 PDT 2017


Hi

I have a system that has to deal with 30+GB files. They can't be 
loaded to the amount of memory I have.

So my idea was to create a way to estimate available system RAM, 
and read a chunk from file which is 1/10 of size of available 
RAM, and process it as far as i can. If the read chunk is too 
small to meaningfully process, then i wait until resources are 
free.  If i read a chunk with some trailing things at the end 
that cant be processed, then i trim it, and reset the seek 
position.

However, i cant find anything on google to tell me how to 
estimate system resource using D. for C++ and windowes, i could 
find some API-s

Can e do this in D?



More information about the Digitalmars-d-learn mailing list