Chromium Code Reviews| Index: base/sys_info.h |
| diff --git a/base/sys_info.h b/base/sys_info.h |
| index aa40cadfbc93791dc57b9513554bea33d4b05c3b..d701fe631d21e902fc1c5c672165cf84ea651dcd 100644 |
| --- a/base/sys_info.h |
| +++ b/base/sys_info.h |
| @@ -28,11 +28,22 @@ class BASE_EXPORT SysInfo { |
| // machine. |
| static int64 AmountOfAvailablePhysicalMemory(); |
| + // Return the number of bytes of virtual memory of this process. A return |
| + // value of zero means that there is no limit on the available virtual |
| + // memory. |
| + static int64 AmountOfVirtualMemory(); |
| + |
| // Return the number of megabytes of physical memory on the current machine. |
| static int AmountOfPhysicalMemoryMB() { |
| return static_cast<int>(AmountOfPhysicalMemory() / 1024 / 1024); |
| } |
| + // Return the number of megabtesof available virtual memory, or zero if it is |
|
Mark Mentovai
2014/04/08 18:49:57
megabtesof
jochen (gone - plz use gerrit)
2014/04/08 19:26:31
Done.
|
| + // unlimited. |
| + static int AmountOfVirtualMemoryMB() { |
|
Mark Mentovai
2014/04/08 18:49:57
I don’t think there’s really any precedent for hav
jochen (gone - plz use gerrit)
2014/04/08 19:26:31
see line 37. I don't care either way
|
| + return static_cast<int>(AmountOfVirtualMemory() / 1024 / 1024); |
| + } |
| + |
| // Return the available disk space in bytes on the volume containing |path|, |
| // or -1 on failure. |
| static int64 AmountOfFreeDiskSpace(const FilePath& path); |