From c1fd082e9c7369f4511eb5a52e58cb15489caa74 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 14 Dec 2022 13:34:11 +0100 Subject: [PATCH] MDEV-25341 post-fix. Don't use DiscardVirtualMemory on Windows. This turns out to be a too expensive call to use for every freed page, especially under global buffer pool mutex protection. Also, the usefulness of proactive shrinking of the buffer pool on Windows this is seems questionable - there is no OOM killer, and the OS will shrink working sets itself. --- storage/innobase/include/buf0buf.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index 2dd6935241e..eb84aff8354 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -662,8 +662,6 @@ public: MEM_NOACCESS(frame, srv_page_size); #ifdef MADV_FREE madvise(frame, srv_page_size, MADV_FREE); -#elif defined(_WIN32) - DiscardVirtualMemory(frame, srv_page_size); #endif }