/ Check-in [95cc976f]
Login

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

Overview
Comment:In os_unix.c, call munmap() to unmap a shared-memory region prior to closing the associated file descriptor.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 95cc976f1520bdaedd8f93b0e9fbef94e4e2c8cc
User & Date: dan 2010-06-07 19:26:54
Context
2010-06-08
15:16
Changes to wal3.test to support small default cache size settings. And builds that create autovacuum databases by default. check-in: ac4cc257 user: dan tags: trunk
2010-06-07
19:26
In os_unix.c, call munmap() to unmap a shared-memory region prior to closing the associated file descriptor. check-in: 95cc976f user: dan tags: trunk
17:47
Change all.test, quick.test and permutations.test so that they use a separate interpreter for each test file. check-in: 7c33eb5a user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

3265
3266
3267
3268
3269
3270
3271

3272
3273
3274
3275
3276
3277
3278
static void unixShmPurge(unixFile *pFd){
  unixShmNode *p = pFd->pInode->pShmNode;
  assert( unixMutexHeld() );
  if( p && p->nRef==0 ){
    assert( p->pInode==pFd->pInode );
    if( p->mutex ) sqlite3_mutex_free(p->mutex);
    if( p->mutexBuf ) sqlite3_mutex_free(p->mutexBuf);

    if( p->h>=0 ) close(p->h);
    p->pInode->pShmNode = 0;
    sqlite3_free(p);
  }
}

/* Forward reference */







>







3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
static void unixShmPurge(unixFile *pFd){
  unixShmNode *p = pFd->pInode->pShmNode;
  assert( unixMutexHeld() );
  if( p && p->nRef==0 ){
    assert( p->pInode==pFd->pInode );
    if( p->mutex ) sqlite3_mutex_free(p->mutex);
    if( p->mutexBuf ) sqlite3_mutex_free(p->mutexBuf);
    if( p->pMMapBuf ) munmap(p->pMMapBuf, p->szMap);
    if( p->h>=0 ) close(p->h);
    p->pInode->pShmNode = 0;
    sqlite3_free(p);
  }
}

/* Forward reference */