SQLite

Check-in [fc64f85092]
Login

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

Overview
Comment:Fix an 8-byte alignment problem on HP/UX. Ticket #3869 (CVS 6666)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fc64f8509299a398ac1513e1778f271083e3eabc
User & Date: drh 2009-05-22 01:00:13.000
Context
2009-05-22
01:02
Add omitted word in the documentation for total_change_count(). ticket #3870. (CVS 6667) (check-in: 3f6fd16f92 user: drh tags: trunk)
01:00
Fix an 8-byte alignment problem on HP/UX. Ticket #3869 (CVS 6666) (check-in: fc64f85092 user: drh tags: trunk)
2009-05-21
20:41
Simplifications to expr.c in support of full coverage testing. (CVS 6665) (check-in: 309adb5e22 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/rowset.c.
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
** The cost of a TEST using the same batch number is O(logN).  The cost
** of the first SMALLEST is O(NlogN).  Second and subsequent SMALLEST
** primitives are constant time.  The cost of DESTROY is O(N).
**
** There is an added cost of O(N) when switching between TEST and
** SMALLEST primitives.
**
** $Id: rowset.c,v 1.6 2009/04/22 15:32:59 drh Exp $
*/
#include "sqliteInt.h"


/*
** Target size for allocation chunks.
*/







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
** The cost of a TEST using the same batch number is O(logN).  The cost
** of the first SMALLEST is O(NlogN).  Second and subsequent SMALLEST
** primitives are constant time.  The cost of DESTROY is O(N).
**
** There is an added cost of O(N) when switching between TEST and
** SMALLEST primitives.
**
** $Id: rowset.c,v 1.7 2009/05/22 01:00:13 drh Exp $
*/
#include "sqliteInt.h"


/*
** Target size for allocation chunks.
*/
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
** an assertion fault occurs.
** 
** If N is larger than the minimum, use the surplus as an initial
** allocation of entries available to be filled.
*/
RowSet *sqlite3RowSetInit(sqlite3 *db, void *pSpace, unsigned int N){
  RowSet *p;
  assert( N >= sizeof(*p) );
  p = pSpace;
  p->pChunk = 0;
  p->db = db;
  p->pEntry = 0;
  p->pLast = 0;
  p->pTree = 0;
  p->pFresh = (struct RowSetEntry*)&p[1];
  p->nFresh = (u16)((N - sizeof(*p))/sizeof(struct RowSetEntry));
  p->isSorted = 1;
  p->iBatch = 0;
  return p;
}

/*
** Deallocate all chunks from a RowSet.  This frees all memory that







|






|
|







123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
** an assertion fault occurs.
** 
** If N is larger than the minimum, use the surplus as an initial
** allocation of entries available to be filled.
*/
RowSet *sqlite3RowSetInit(sqlite3 *db, void *pSpace, unsigned int N){
  RowSet *p;
  assert( N >= ROUND8(sizeof(*p)) );
  p = pSpace;
  p->pChunk = 0;
  p->db = db;
  p->pEntry = 0;
  p->pLast = 0;
  p->pTree = 0;
  p->pFresh = (struct RowSetEntry*)(ROUND8(sizeof(*p)) + (char*)p);
  p->nFresh = (u16)((N - ROUND8(sizeof(*p)))/sizeof(struct RowSetEntry));
  p->isSorted = 1;
  p->iBatch = 0;
  return p;
}

/*
** Deallocate all chunks from a RowSet.  This frees all memory that