mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-30 14:02:05 +08:00
mdbx: drop some unused stuff.
Change-Id: I136dcf891757d5c1a35a8082ee90e8cf07c016c6
This commit is contained in:
parent
cc46f398ed
commit
e75033b1f4
12
src/core.c
12
src/core.c
@ -12913,18 +12913,6 @@ static struct node_result __hot mdbx_node_search(MDBX_cursor *mc,
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if 0 /* unused for now */
|
||||
static void mdbx_cursor_adjust(MDBX_cursor *mc, func) {
|
||||
MDBX_cursor *m2;
|
||||
|
||||
for (m2 = mc->mc_txn->tw.cursors[mc->mc_dbi]; m2; m2 = m2->mc_next) {
|
||||
if (m2->mc_pg[m2->mc_top] == mc->mc_pg[mc->mc_top]) {
|
||||
func(mc, m2);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Pop a page off the top of the cursor's stack. */
|
||||
static __inline void mdbx_cursor_pop(MDBX_cursor *mc) {
|
||||
if (mc->mc_snum) {
|
||||
|
@ -733,17 +733,6 @@ static void WINAPI stub_srwlock_ReleaseExclusive(MDBX_srwlock *srwl) {
|
||||
srwl->writerCount = 0;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#if 0 /* LY: unused for now */
|
||||
static DWORD WINAPI stub_DiscardVirtualMemory(PVOID VirtualAddress,
|
||||
SIZE_T Size) {
|
||||
return VirtualAlloc(VirtualAddress, Size, MEM_RESET, PAGE_NOACCESS)
|
||||
? ERROR_SUCCESS
|
||||
: (int)GetLastError();
|
||||
}
|
||||
#endif /* unused for now */
|
||||
|
||||
static uint64_t WINAPI stub_GetTickCount64(void) {
|
||||
LARGE_INTEGER Counter, Frequency;
|
||||
return (QueryPerformanceFrequency(&Frequency) &&
|
||||
@ -753,6 +742,7 @@ static uint64_t WINAPI stub_GetTickCount64(void) {
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef xMDBX_ALLOY
|
||||
MDBX_srwlock_function mdbx_srwlock_Init, mdbx_srwlock_AcquireShared,
|
||||
mdbx_srwlock_ReleaseShared, mdbx_srwlock_AcquireExclusive,
|
||||
@ -767,11 +757,6 @@ MDBX_NtFsControlFile mdbx_NtFsControlFile;
|
||||
MDBX_PrefetchVirtualMemory mdbx_PrefetchVirtualMemory;
|
||||
MDBX_GetTickCount64 mdbx_GetTickCount64;
|
||||
MDBX_RegGetValueA mdbx_RegGetValueA;
|
||||
#if 0 /* LY: unused for now */
|
||||
MDBX_DiscardVirtualMemory mdbx_DiscardVirtualMemory;
|
||||
MDBX_OfferVirtualMemory mdbx_OfferVirtualMemory;
|
||||
MDBX_ReclaimVirtualMemory mdbx_ReclaimVirtualMemory;
|
||||
#endif /* unused for now */
|
||||
#endif /* xMDBX_ALLOY */
|
||||
|
||||
static void mdbx_winnt_import(void) {
|
||||
@ -802,21 +787,6 @@ static void mdbx_winnt_import(void) {
|
||||
|
||||
const HINSTANCE hAdvapi32dll = GetModuleHandleA("advapi32.dll");
|
||||
GET_PROC_ADDR(hAdvapi32dll, RegGetValueA);
|
||||
|
||||
#if 0 /* LY: unused for now */
|
||||
if (!mdbx_RunningUnderWine()) {
|
||||
GET_PROC_ADDR(hKernel32dll, DiscardVirtualMemory);
|
||||
GET_PROC_ADDR(hKernel32dll, OfferVirtualMemory);
|
||||
GET_PROC_ADDR(hKernel32dll, ReclaimVirtualMemory);
|
||||
}
|
||||
if (!mdbx_DiscardVirtualMemory)
|
||||
mdbx_DiscardVirtualMemory = stub_DiscardVirtualMemory;
|
||||
if (!mdbx_OfferVirtualMemory)
|
||||
mdbx_OfferVirtualMemory = stub_OfferVirtualMemory;
|
||||
if (!mdbx_ReclaimVirtualMemory)
|
||||
mdbx_ReclaimVirtualMemory = stub_ReclaimVirtualMemory;
|
||||
#endif /* unused for now */
|
||||
|
||||
#undef GET_PROC_ADDR
|
||||
|
||||
const MDBX_srwlock_function init =
|
||||
|
26
src/osal.h
26
src/osal.h
@ -949,32 +949,6 @@ typedef BOOL(WINAPI *MDBX_PrefetchVirtualMemory)(
|
||||
PWIN32_MEMORY_RANGE_ENTRY VirtualAddresses, ULONG Flags);
|
||||
MDBX_INTERNAL_VAR MDBX_PrefetchVirtualMemory mdbx_PrefetchVirtualMemory;
|
||||
|
||||
#if 0 /* LY: unused for now */
|
||||
#if !defined(_WIN32_WINNT_WIN81) || _WIN32_WINNT < _WIN32_WINNT_WIN81
|
||||
typedef enum OFFER_PRIORITY {
|
||||
VmOfferPriorityVeryLow = 1,
|
||||
VmOfferPriorityLow,
|
||||
VmOfferPriorityBelowNormal,
|
||||
VmOfferPriorityNormal
|
||||
} OFFER_PRIORITY;
|
||||
#endif /* Windows 8.1 */
|
||||
|
||||
typedef DWORD(WINAPI *MDBX_DiscardVirtualMemory)(PVOID VirtualAddress,
|
||||
SIZE_T Size);
|
||||
MDBX_INTERNAL_VAR MDBX_DiscardVirtualMemory mdbx_DiscardVirtualMemory;
|
||||
|
||||
typedef DWORD(WINAPI *MDBX_ReclaimVirtualMemory)(PVOID VirtualAddress,
|
||||
SIZE_T Size);
|
||||
MDBX_INTERNAL_VAR MDBX_ReclaimVirtualMemory mdbx_ReclaimVirtualMemory;
|
||||
|
||||
typedef DWORD(WINAPI *MDBX_OfferVirtualMemory(
|
||||
PVOID VirtualAddress,
|
||||
SIZE_T Size,
|
||||
OFFER_PRIORITY Priority
|
||||
);
|
||||
MDBX_INTERNAL_VAR MDBX_OfferVirtualMemory mdbx_OfferVirtualMemory;
|
||||
#endif /* unused for now */
|
||||
|
||||
typedef enum _SECTION_INHERIT { ViewShare = 1, ViewUnmap = 2 } SECTION_INHERIT;
|
||||
|
||||
typedef NTSTATUS(NTAPI *MDBX_NtExtendSection)(IN HANDLE SectionHandle,
|
||||
|
Loading…
x
Reference in New Issue
Block a user