How to retrieve total amount of system RAM?

Denis Koroskin 2korden at gmail.com
Wed Aug 13 11:52:03 PDT 2008


On Wed, 13 Aug 2008 22:39:36 +0400, Steven Schveighoffer  
<schveiguy at yahoo.com> wrote:

> "Benji Smith" wrote
>> I've been looking through Tango documentation for a function that'll  
>> tell
>> me the total amount of RAM installed on the system, bu I can't find
>> anything that looks helpful. Anyone have any suggestions?
>>
>> Thanks!
>
> This is something that is highly OS-dependant (and even different  
> versions
> of the same OS do it differently).  It's not something that Tango is  
> likely
> to provide an abstract interface for.
>
> -Steve
>
>

The same goes for IO (console I/O, file I/O, socket etc). Despite that it  
is present in Tango.

I see a huge benefit of having (at least basic) OS statistics (like OS  
name, version, type, device presence and capabilities - RAM, CPU, etc) in  
the standard library. Isn't is supposed to eliminate custom  
platform-specific code?


More information about the Digitalmars-d-learn mailing list