MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / AvailableRam

Function AvailableRam

tensorflow/core/platform/posix/port.cc:359–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357}
358
359int64 AvailableRam() {
360#if defined(__linux__) && !defined(__ANDROID__)
361 struct sysinfo info;
362 int err = sysinfo(&info);
363 if (err == 0) {
364 return info.freeram;
365 }
366#endif
367 return INT64_MAX;
368}
369
370} // namespace port
371} // namespace tensorflow

Callers 8

GetLocalCPUInfoFunction · 0.50
ModelDatasetOpMethod · 0.50

Calls 1

sysinfoClass · 0.85

Tested by

no test coverage detected