*** DRAFT ***

SQLite Requirement Matrix Details
hard_heap_limit64.html

Index Summary Markup Original


R-54493-30181-37798-05514-46235-61023-30019-39106 tcl slt th3 src

The sqlite3_soft_heap_limit64() interface sets and/or queries the soft limit on the amount of heap memory that may be allocated by SQLite.

th3/req1/softheaplimit01.test:12

/* IMP: R-54493-30181 */
# EVIDENCE-OF: R-54493-30181 The sqlite3_soft_heap_limit64() interface
# sets and/or queries the soft limit on the amount of heap memory that
# may be allocated by SQLite.

R-27925-06263-58551-32265-51230-19990-38380-59040 tcl slt th3 src

SQLite strives to keep heap memory utilization below the soft heap limit by reducing the number of pages held in the page cache as heap memory usages approaches the limit.

th3/req1/softheaplimit02.test:9

/* IMP: R-27925-06263 */
# EVIDENCE-OF: R-27925-06263 SQLite strives to keep heap memory
# utilization below the soft heap limit by reducing the number of pages
# held in the page cache as heap memory usages approaches the limit.

R-54035-60779-28299-56700-44695-40391-47008-32723 tcl slt th3 src

The soft heap limit is "soft" because even though SQLite strives to stay below the limit, it will exceed the limit rather than generate an SQLITE_NOMEM error.

th3/req1/softheaplimit02.test:16

/* IMP: R-54035-60779 */
# EVIDENCE-OF: R-54035-60779 The soft heap limit is "soft" because even
# though SQLite strives to stay below the limit, it will exceed the
# limit rather than generate an SQLITE_NOMEM error.

R-53924-42297-60529-07660-45668-52976-46184-14405 tcl slt th3 src

The sqlite3_hard_heap_limit64(N) interface sets a hard upper bound of N bytes on the amount of memory that will be allocated.

/* IMP: R-53924-42297 */
# EVIDENCE-OF: R-53924-42297 The sqlite3_hard_heap_limit64(N) interface
# sets a hard upper bound of N bytes on the amount of memory that will
# be allocated.

R-36882-08642-64574-34445-28855-37148-23559-38229 tcl slt th3 src

The sqlite3_hard_heap_limit64(N) interface is similar to sqlite3_soft_heap_limit64(N) except that memory allocations will fail when the hard heap limit is reached.

/* IMP: R-36882-08642 */
# EVIDENCE-OF: R-36882-08642 The sqlite3_hard_heap_limit64(N) interface
# is similar to sqlite3_soft_heap_limit64(N) except that memory
# allocations will fail when the hard heap limit is reached.

R-57611-29319-52424-65046-25950-44814-17641-61305 tcl slt th3 src

The return value from both sqlite3_soft_heap_limit64() and sqlite3_hard_heap_limit64() is the size of the heap limit prior to the call, or negative in the case of an error.

th3/req1/softheaplimit01.test:16

/* IMP: R-57611-29319 */
# EVIDENCE-OF: R-57611-29319 The return value from both
# sqlite3_soft_heap_limit64() and sqlite3_hard_heap_limit64() is the
# size of the heap limit prior to the call, or negative in the case of
# an error.

R-06730-45014-00107-46861-15784-38161-55624-19541 tcl slt th3 src

If the argument N is negative then no change is made to the heap limit.

th3/req1/softheaplimit01.test:21

/* IMP: R-06730-45014 */
# EVIDENCE-OF: R-06730-45014 If the argument N is negative then no
# change is made to the heap limit.

R-42053-10634-10178-57084-38599-37696-52821-41019 tcl slt th3 src

Setting the heap limits to zero disables the heap limiter mechanism.

th3/req1/softheaplimit02.test:23

/* IMP: R-42053-10634 */
# EVIDENCE-OF: R-42053-10634 Setting the heap limits to zero disables
# the heap limiter mechanism.

R-52858-40376-16050-37055-60638-11562-16087-23807 tcl slt th3 src

The soft heap limit may not be greater than the hard heap limit.

/* IMP: R-52858-40376 */
# EVIDENCE-OF: R-52858-40376 The soft heap limit may not be greater than
# the hard heap limit.

R-48588-03878-62970-41028-04279-19068-00654-07997 tcl slt th3 src

If the hard heap limit is enabled and if sqlite3_soft_heap_limit(N) is invoked with a value of N that is greater than the hard heap limit, the soft heap limit is set to the value of the hard heap limit.

/* IMP: R-48588-03878 */
# EVIDENCE-OF: R-48588-03878 If the hard heap limit is enabled and if
# sqlite3_soft_heap_limit(N) is invoked with a value of N that is
# greater than the hard heap limit, the soft heap limit is set to the
# value of the hard heap limit.

R-14928-00869-49295-06828-40495-44673-44350-58207 tcl slt th3 src

The soft heap limit is automatically enabled whenever the hard heap limit is enabled.

/* IMP: R-14928-00869 */
# EVIDENCE-OF: R-14928-00869 The soft heap limit is automatically
# enabled whenever the hard heap limit is enabled.

R-21205-43338-53386-10621-24475-38034-05751-45938 tcl slt th3 src

When sqlite3_hard_heap_limit64(N) is invoked and the soft heap limit is outside the range of 1.

/* IMP: R-21205-43338 */
# EVIDENCE-OF: R-21205-43338 When sqlite3_hard_heap_limit64(N) is
# invoked and the soft heap limit is outside the range of 1.

R-50479-29416-05730-38331-50823-03190-30140-42480 tcl slt th3 src

Invoking sqlite3_soft_heap_limit64(0) when the hard heap limit is enabled makes the soft heap limit equal to the hard heap limit.

/* IMP: R-50479-29416 */
# EVIDENCE-OF: R-50479-29416 Invoking sqlite3_soft_heap_limit64(0) when
# the hard heap limit is enabled makes the soft heap limit equal to the
# hard heap limit.

R-02230-09674-61561-02587-07108-44631-60022-03374 tcl slt th3 src

The heap limits are not enforced in the current implementation if one or more of following conditions are true:

th3/req1/softheaplimit02.test:29

/* IMP: R-02230-09674 */
# EVIDENCE-OF: R-02230-09674 The heap limits are not enforced in the
# current implementation if one or more of following conditions are
# true: The limit value is set to zero. Memory accounting is disabled
# using a combination of the sqlite3_config(SQLITE_CONFIG_MEMSTATUS,...)
# start-time option and the SQLITE_DEFAULT_MEMSTATUS compile-time
# option. An alternative page cache implementation is specified using
# sqlite3_config(SQLITE_CONFIG_PCACHE2,...). The page cache allocates
# from its own memory pool supplied by
# sqlite3_config(SQLITE_CONFIG_PAGECACHE,...) rather than from the heap.