mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-20684: innodb/query cache use madvise CORE/NOCORE on FreeBSD
This applies to large allocations. This maps to the way Linux does it in MDEV-10814 except FreeBSD uses different constants. Adjust error string to match to implementation. Tested on FreeBSD-12.0
This commit is contained in:
committed by
Sergey Vojtovich
parent
7e44c455f4
commit
716c748f97
@ -2662,7 +2662,7 @@ size_t Query_cache::init_cache()
|
||||
#if defined(DBUG_OFF) && defined(HAVE_MADVISE) && defined(MADV_DONTDUMP)
|
||||
if (madvise(cache, query_cache_size+additional_data_size, MADV_DONTDUMP))
|
||||
{
|
||||
DBUG_PRINT("warning", ("coudn't mark query cache memory as MADV_DONTDUMP: %s",
|
||||
DBUG_PRINT("warning", ("coudn't mark query cache memory as " DONTDUMP_STR ": %s",
|
||||
strerror(errno)));
|
||||
}
|
||||
#endif
|
||||
@ -2831,7 +2831,7 @@ void Query_cache::free_cache()
|
||||
#if defined(DBUG_OFF) && defined(HAVE_MADVISE) && defined(MADV_DODUMP)
|
||||
if (madvise(cache, query_cache_size+additional_data_size, MADV_DODUMP))
|
||||
{
|
||||
DBUG_PRINT("warning", ("coudn't mark query cache memory as MADV_DODUMP: %s",
|
||||
DBUG_PRINT("warning", ("coudn't mark query cache memory as " DODUMP_STR ": %s",
|
||||
strerror(errno)));
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user