MCPcopy Create free account
hub / github.com/Niko1221/Strata / log_complement_memory

Function log_complement_memory

engine/sycl/src/core/expert_source.cpp:363–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361}
362
363void log_complement_memory(const char* stage, uint64_t requested) {
364#if defined(_WIN32)
365 MEMORYSTATUSEX status{};
366 status.dwLength = sizeof(status);
367 if (!GlobalMemoryStatusEx(&status)) {
368 std::fprintf(stderr, "FileExpertSource: %s: GlobalMemoryStatusEx failed (error %lu)\n", stage, GetLastError());
369 return;
370 }
371 std::fprintf(stderr, "FileExpertSource: %s: requested %.2f GiB, available RAM %.2f GiB, available commit %.2f GiB "
372 "(limit %.2f GiB; the page files may grow by %.2f GiB more), available virtual address space %.2f GiB\n",
373 stage, (double) requested / 1073741824.0, (double) status.ullAvailPhys / 1073741824.0,
374 (double) status.ullAvailPageFile / 1073741824.0, (double) status.ullTotalPageFile / 1073741824.0,
375 (double) strata::platform::commit_growth((uint64_t) status.ullTotalPhys) / 1073741824.0,
376 (double) status.ullAvailVirtual / 1073741824.0);
377#else
378 (void) stage;
379 (void) requested;
380#endif
381}
382
383/// #286: an unbuffered file handle - a HANDLE on Windows, an O_DIRECT descriptor (as a pointer-sized integer) on Linux.
384void close_direct(void* h) {

Callers 1

pin_cache_complementMethod · 0.70

Calls 1

commit_growthFunction · 0.85

Tested by

no test coverage detected