SQLite

Check-in [ca479f3de2]
Login

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

Overview
Comment:Make the size of a Bitvec object 512 bytes on all platforms, instead of having the size depend on the size of a pointer. This makes testing easier.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ca479f3de2927ccc05dc76d10e40c00b8e0c88d1
User & Date: drh 2010-08-05 11:56:01.000
Context
2010-08-06
02:10
Change two automatic array variables into static constant arrays. Update and reformat some comments for cleaner presentation. (check-in: a7a15547cc user: drh tags: trunk)
2010-08-05
16:22
Merge trunk changes with experimental branch. (check-in: acd26b8b74 user: dan tags: experimental)
11:56
Make the size of a Bitvec object 512 bytes on all platforms, instead of having the size depend on the size of a pointer. This makes testing easier. (check-in: ca479f3de2 user: drh tags: trunk)
03:21
Do not read the database file size on a SAVEPOINT rollback any more since after checkin [65b8636ac6e5] the in-header-size field is always valid. (check-in: fbe70e1106 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/bitvec.c.
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
** Bitvec object is the number of pages in the database file at the
** start of a transaction, and is thus usually less than a few thousand,
** but can be as large as 2 billion for a really big database.
*/
#include "sqliteInt.h"

/* Size of the Bitvec structure in bytes. */
#define BITVEC_SZ        (sizeof(void*)*128)  /* 512 on 32bit.  1024 on 64bit */

/* Round the union size down to the nearest pointer boundary, since that's how 
** it will be aligned within the Bitvec struct. */
#define BITVEC_USIZE     (((BITVEC_SZ-(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))

/* Type of the array "element" for the bitmap representation. 
** Should be a power of 2, and ideally, evenly divide into BITVEC_USIZE. 







|







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
** Bitvec object is the number of pages in the database file at the
** start of a transaction, and is thus usually less than a few thousand,
** but can be as large as 2 billion for a really big database.
*/
#include "sqliteInt.h"

/* Size of the Bitvec structure in bytes. */
#define BITVEC_SZ        512

/* Round the union size down to the nearest pointer boundary, since that's how 
** it will be aligned within the Bitvec struct. */
#define BITVEC_USIZE     (((BITVEC_SZ-(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))

/* Type of the array "element" for the bitmap representation. 
** Should be a power of 2, and ideally, evenly divide into BITVEC_USIZE.