> The SQLITE_DEFAULT_CACHE_SIZE value is always measured in pages.

http://sqlite.org/compile.html#default_cache_size
http://sqlite.org/pragma.html#pragma_cache_size

My interpretation is that the option to provide a negative value has been 
introduced to allow specification of cache size limits independent of used page 
size. And it has been used like that:

Changes carried forward from version 3.12.0 (2016-03-29):

    Potentially Disruptive Change:
    The SQLITE_DEFAULT_PAGE_SIZE is increased from 1024 to 4096. The 
SQLITE_DEFAULT_CACHE_SIZE is changed from 2000 to -2000 so the same amount of 
cache memory is used by default. See the application note on the version 3.12.0 
page size change for further information.


Am I missing something?

Best regards,
Detlef.

-----Original Message-----
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On 
Behalf Of Joe Mistachkin
Sent: Monday, February 20, 2017 10:02 AM
To: 'SQLite mailing list'
Subject: Re: [sqlite] Bug? Incorrect use of SQLITE_DEFAULT_CACHE_SIZE


Detlef Golze wrote:
>
> SQLITE_DEFAULT_CACHE_SIZE is defined as page size if positive or
> Kbyte if negative.
>

The SQLITE_DEFAULT_CACHE_SIZE value is always measured in pages.

>
> I came here because I got an integer overflow in the definition
> of SQLITE_WIN32_HEAP_INIT_SIZE.
>

What values are you using for the SQLITE_DEFAULT_CACHE_SIZE and
SQLITE_DEFAULT_PAGE_SIZE defines?

--
Joe Mistachkin @ https://urn.to/r/mistachkin

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to