8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 21:23:03 +01:00

Improvement CORE-1687 : Allow bigger cache sizes than 2 GB (16K * 128 K) for x64 builds

This commit is contained in:
hvlad 2009-09-06 09:39:40 +00:00
parent f2acd2b410
commit 1c1dbeae5b
2 changed files with 6 additions and 2 deletions

View File

@ -5515,8 +5515,8 @@ static ULONG memory_init(thread_db* tdbb, BufferControl* bcb, SLONG number)
UCHAR* memory = NULL;
SLONG buffers = 0;
const SLONG page_size = (SLONG) dbb->dbb_page_size;
SLONG memory_size = page_size * (number + 1);
const size_t page_size = dbb->dbb_page_size;
size_t memory_size = page_size * (number + 1);
fb_assert(memory_size > 0);
SLONG old_buffers = 0;

View File

@ -66,7 +66,11 @@ class Database;
// Page buffer cache size constraints.
const ULONG MIN_PAGE_BUFFERS = 50;
#if SIZEOF_VOID_P == 4
const ULONG MAX_PAGE_BUFFERS = 131072;
#else
const ULONG MAX_PAGE_BUFFERS = MAX_SLONG - 1;
#endif
#define DIRTY_LIST
//#define DIRTY_TREE