Skip to content

Commit c24c6ff

Browse files
committed
fix: Windows build
1 parent e050cdf commit c24c6ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llama/addon/globals/getMemoryInfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ Napi::Value getMemoryInfo(const Napi::CallbackInfo& info) {
4848
addonLlamaCppLogCallback(GGML_LOG_LEVEL_ERROR, std::string("Failed to get memory usage info").c_str(), nullptr);
4949
}
5050
#elif _WIN32
51-
PROCESS_MEMORY_COUNTERS memCounters;
52-
53-
if (GetProcessMemoryInfo(GetCurrentProcess(), &memCounters, sizeof(memCounters))) {
51+
PROCESS_MEMORY_COUNTERS_EX memCounters;
52+
53+
if (GetProcessMemoryInfo(GetCurrentProcess(), (PROCESS_MEMORY_COUNTERS*)&memCounters, sizeof(memCounters))) {
5454
totalMemoryUsage = memCounters.PrivateUsage;
5555
} else {
5656
addonLlamaCppLogCallback(GGML_LOG_LEVEL_ERROR, std::string("Failed to get memory usage info").c_str(), nullptr);

0 commit comments

Comments
 (0)