SQLite

Check-in [50edc2f914]
Login

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

Overview
Comment:Disable checking the winMemData structure signature when compiled with NDEBUG.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | winNativeHeap
Files: files | file ages | folders
SHA1: 50edc2f9141bd13277119afd129387029ebe5c01
User & Date: mistachkin 2011-08-26 01:45:50.307
Context
2011-08-26
05:40
In the MSVC makefile, allow symbols to be enabled without NDEBUG defined. Also, for the win32lock test, make sure the database is closed prior to shutdown. (Closed-Leaf check-in: 5ed7633d41 user: mistachkin tags: winNativeHeap)
01:45
Disable checking the winMemData structure signature when compiled with NDEBUG. (check-in: 50edc2f914 user: mistachkin tags: winNativeHeap)
01:32
Allow the Win32 native heap flags to be overridden at compile-time. (check-in: 1c2ecec8e7 user: mistachkin tags: winNativeHeap)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/os_win.c.
149
150
151
152
153
154
155

156

157
158
159
160

161

162
163





164

165




166
167
168
169
170
171
172

/*
** The winMemData structure stores information required by the Win32-specific
** sqlite3_mem_methods implementation.
*/
typedef struct winMemData winMemData;
struct winMemData {

  u32 magic;    /* Magic number to detect structure corruption. */

  HANDLE hHeap; /* The handle to our heap. */
  BOOL bOwned;  /* Do we own the heap (i.e. destroy it on shutdown)? */
};


#define WINMEM_MAGIC     0x42b2830b


static struct winMemData win_mem_data = { WINMEM_MAGIC, NULL, FALSE };







#define winMemAssertMagic() assert( win_mem_data.magic==WINMEM_MAGIC )




#define winMemGetHeap() win_mem_data.hHeap

static void *winMemMalloc(int nBytes);
static void winMemFree(void *pPrior);
static void *winMemRealloc(void *pPrior, int nBytes);
static int winMemSize(void *p);
static int winMemRoundup(int n);







>

>




>

>

|
>
>
>
>
>

>

>
>
>
>







149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186

/*
** The winMemData structure stores information required by the Win32-specific
** sqlite3_mem_methods implementation.
*/
typedef struct winMemData winMemData;
struct winMemData {
#ifndef NDEBUG
  u32 magic;    /* Magic number to detect structure corruption. */
#endif
  HANDLE hHeap; /* The handle to our heap. */
  BOOL bOwned;  /* Do we own the heap (i.e. destroy it on shutdown)? */
};

#ifndef NDEBUG
#define WINMEM_MAGIC     0x42b2830b
#endif

static struct winMemData win_mem_data = {
#ifndef NDEBUG
  WINMEM_MAGIC,
#endif
  NULL, FALSE
};

#ifndef NDEBUG
#define winMemAssertMagic() assert( win_mem_data.magic==WINMEM_MAGIC )
#else
#define winMemAssertMagic()
#endif

#define winMemGetHeap() win_mem_data.hHeap

static void *winMemMalloc(int nBytes);
static void winMemFree(void *pPrior);
static void *winMemRealloc(void *pPrior, int nBytes);
static int winMemSize(void *p);
static int winMemRoundup(int n);