SQLite

Check-in [988998fe7b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Updates to the sqlite3_mem_methods documentation.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 988998fe7b0a21ed113b67f812e51f357045bef4
User & Date: drh 2011-08-24 15:18:16.947
Context
2011-08-25
00:14
Add the SQLITE_EXTRA_INIT macro. (check-in: a3220f36c1 user: drh tags: trunk)
2011-08-24
16:13
Experimental work to allow SQLite to use the native Win32 heap API. (check-in: bf3d0ab538 user: mistachkin tags: winNativeHeap)
15:18
Updates to the sqlite3_mem_methods documentation. (check-in: 988998fe7b user: drh tags: trunk)
15:12
Fix some harmless compiler warnings. (check-in: 46f5a68bfa user: drh tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/sqlite.h.in.
1201
1202
1203
1204
1205
1206
1207
1208
1209


1210
1211
1212
1213

1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1201
1202
1203
1204
1205
1206
1207


1208
1209




1210
1211



1212
1213
1214
1215
1216
1217
1218







-
-
+
+
-
-
-
-
+

-
-
-







** and that this object is only useful to a tiny minority of applications
** with specialized memory allocation requirements.  This object is
** also used during testing of SQLite in order to specify an alternative
** memory allocator that simulates memory out-of-memory conditions in
** order to verify that SQLite recovers gracefully from such
** conditions.
**
** The xMalloc and xFree methods must work like the
** malloc() and free() functions from the standard C library.
** The xMalloc, xRealloc, and xFree methods must work like the
** malloc(), realloc() and free() functions from the standard C library.
** The xRealloc method must work like realloc() from the standard C library
** with the exception that if the second argument to xRealloc is zero,
** xRealloc must be a no-op - it must not perform any allocation or
** deallocation.  ^SQLite guarantees that the second argument to
** ^SQLite guarantees that the second argument to
** xRealloc is always a value returned by a prior call to xRoundup.
** And so in cases where xRoundup always returns a positive number,
** xRealloc can perform exactly as the standard library realloc() and
** still be in compliance with this specification.
**
** xSize should return the allocated size of a memory allocation
** previously obtained from xMalloc or xRealloc.  The allocated size
** is always at least as big as the requested size but may be larger.
**
** The xRoundup method returns what would be the allocated size of
** a memory allocation given a particular requested size.  Most memory