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.
This commit is contained in:
Vladislav Vaintroub 2022-12-14 13:34:11 +01:00
parent 0aca3012a1
commit c1fd082e9c

View file

@ -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
}