mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
Add the experimental mem5.c memory allocator. Allocate the content part
of cache pages separately from the header. (See check-ins (4495) and (4409)). (CVS 4789) FossilOrigin-Name: 669ece8c82bfa69add852589dd1211751cb26fb2
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
** Internal interface definitions for SQLite.
|
||||
**
|
||||
** @(#) $Id: sqliteInt.h,v 1.661 2008/02/13 18:25:27 danielk1977 Exp $
|
||||
** @(#) $Id: sqliteInt.h,v 1.662 2008/02/14 23:26:56 drh Exp $
|
||||
*/
|
||||
#ifndef _SQLITEINT_H_
|
||||
#define _SQLITEINT_H_
|
||||
@@ -117,6 +117,32 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Exactly one of the following macros must be defined in order to
|
||||
** specify which memory allocation subsystem to use.
|
||||
**
|
||||
** SQLITE_SYSTEM_MALLOC // Use normal system malloc()
|
||||
** SQLITE_MEMDEBUG // Debugging version of system malloc()
|
||||
** SQLITE_MEMORY_SIZE // internal allocator #1
|
||||
** SQLITE_MMAP_HEAP_SIZE // internal mmap() allocator
|
||||
** SQLITE_POW2_MEMORY_SIZE // internal power-of-two allocator
|
||||
**
|
||||
** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as
|
||||
** the default.
|
||||
*/
|
||||
#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)+\
|
||||
defined(SQLITE_MEMORY_SIZE)+defined(SQLITE_MMAP_HEAP_SIZE)+\
|
||||
defined(SQLITE_POW2_MEMORY_SIZE)>1
|
||||
# error "At most one of the following compile-time configuration options\
|
||||
is allows: SQLITE_SYSTEM_MALLOC, SQLITE_MEMDEBUG, SQLITE_MEMORY_SIZE,\
|
||||
SQLITE_MMAP_HEAP_SIZE, SQLITE_POW2_MEMORY_SIZE"
|
||||
#endif
|
||||
#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)+\
|
||||
defined(SQLITE_MEMORY_SIZE)+defined(SQLITE_MMAP_HEAP_SIZE)+\
|
||||
defined(SQLITE_POW2_MEMORY_SIZE)==0
|
||||
# define SQLITE_SYSTEM_MALLOC 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
** We need to define _XOPEN_SOURCE as follows in order to enable
|
||||
** recursive mutexes on most unix systems. But Mac OS X is different.
|
||||
|
||||
Reference in New Issue
Block a user