| 357 | } |
| 358 | |
| 359 | int64 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 |
no test coverage detected