diff options
author | 2018-02-05 18:22:37 -0800 | |
---|---|---|
committer | 2018-02-05 18:26:36 -0800 | |
commit | 09138338ed81b56aeaff88b9ee5a11c3f6d77b70 (patch) | |
tree | f4fb446b606a4e120072f9364c2878ee9d36d446 /tensorflow/core/platform/mem.h | |
parent | 54dd9c9d38ad93f5e2d9c880d57a5df57fbe26ab (diff) |
Added the ability to query the amount of RAM available
Also added the ability to query the CPU frequency on Windows.
PiperOrigin-RevId: 184620390
Diffstat (limited to 'tensorflow/core/platform/mem.h')
-rw-r--r-- | tensorflow/core/platform/mem.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/core/platform/mem.h b/tensorflow/core/platform/mem.h index dc389a8741..7bb9fc264f 100644 --- a/tensorflow/core/platform/mem.h +++ b/tensorflow/core/platform/mem.h @@ -59,6 +59,9 @@ void MallocExtension_ReleaseToSystem(std::size_t num_bytes); // routine, this routine returns 0. std::size_t MallocExtension_GetAllocatedSize(const void* p); +// Returns the amount of RAM available in kB, or INT64_MAX if unknown. +int64 AvailableRam(); + } // namespace port } // namespace tensorflow |