SQLite

Check-in [1a88e31b03]
Login

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

Overview
Comment:Correct an assert() in mem2.c (test code only).
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1a88e31b03e090732243a70bec082b32ecf77c43
User & Date: dan 2010-03-08 15:17:53.000
Context
2010-03-08
21:40
Add NEVER and assert macros and explanatory comments for unreachable conditions. (check-in: ffb6596e6c user: drh tags: trunk)
15:17
Correct an assert() in mem2.c (test code only). (check-in: 1a88e31b03 user: dan tags: trunk)
10:32
Do not run the stmt.test script as part of the inmemory_journal permutation. (check-in: 049cadf92b user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/mem2.c.
296
297
298
299
300
301
302
303

304
305
306
307
308
309
310
/*
** Free memory.
*/
static void sqlite3MemFree(void *pPrior){
  struct MemBlockHdr *pHdr;
  void **pBt;
  char *z;
  assert( sqlite3GlobalConfig.bMemstat || mem.mutex!=0 );

  pHdr = sqlite3MemsysGetHeader(pPrior);
  pBt = (void**)pHdr;
  pBt -= pHdr->nBacktraceSlots;
  sqlite3_mutex_enter(mem.mutex);
  if( pHdr->pPrev ){
    assert( pHdr->pPrev->pNext==pHdr );
    pHdr->pPrev->pNext = pHdr->pNext;







|
>







296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
/*
** Free memory.
*/
static void sqlite3MemFree(void *pPrior){
  struct MemBlockHdr *pHdr;
  void **pBt;
  char *z;
  assert( sqlite3GlobalConfig.bMemstat || sqlite3GlobalConfig.bCoreMutex==0 
       || mem.mutex!=0 );
  pHdr = sqlite3MemsysGetHeader(pPrior);
  pBt = (void**)pHdr;
  pBt -= pHdr->nBacktraceSlots;
  sqlite3_mutex_enter(mem.mutex);
  if( pHdr->pPrev ){
    assert( pHdr->pPrev->pNext==pHdr );
    pHdr->pPrev->pNext = pHdr->pNext;