From 825a43caf2eb90b8b777b8e356c3c54eec4ba89e Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Fri, 20 May 2022 15:58:21 +0200 Subject: [PATCH] third fix for Windows --- src/runtime/c/pgf/db.cxx | 9 ++++----- src/runtime/c/pgf/db.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/runtime/c/pgf/db.cxx b/src/runtime/c/pgf/db.cxx index 15f56e570..d0f120c8f 100644 --- a/src/runtime/c/pgf/db.cxx +++ b/src/runtime/c/pgf/db.cxx @@ -1410,10 +1410,10 @@ void PgfDB::resize_map(size_t new_size) throw pgf_systemerror(last_error_to_errno()); } - new_ms = (malloc_state*) MapViewOfFile(hMap, - FILE_MAP_WRITE, - 0,0,new_size); - if (new_ms == NULL) + ms = (malloc_state*) MapViewOfFile(hMap, + FILE_MAP_WRITE, + 0,0,new_size); + if (ms == NULL) throw pgf_systemerror(last_error_to_errno()); } else { new_ms = (malloc_state*) ::realloc(ms, new_size); @@ -1422,7 +1422,6 @@ void PgfDB::resize_map(size_t new_size) } new_size -= page_size; - ms = new_ms; base = ((unsigned char*) ms) + page_size; #endif current_base = (unsigned char*) base; diff --git a/src/runtime/c/pgf/db.h b/src/runtime/c/pgf/db.h index c03d1f543..5cd46ac1d 100644 --- a/src/runtime/c/pgf/db.h +++ b/src/runtime/c/pgf/db.h @@ -79,7 +79,7 @@ private: #else DWORD pid; HANDLE hMap; - HANDLE hMutex; + HANDLE hМutex; HANDLE hRWEvent; #endif