/ Check-in [e7b7f588]
Login
Overview
Comment:Remove an unnecessary memset().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:e7b7f5884a78630c6ba6a217c36247397e62f1928d4b480df929efcfc4a01893
User & Date: drh 2018-02-21 00:48:02
Context
2018-02-21
01:05
Small performance improvement in sqltie3WalFindFrame(). check-in: 52013cad user: drh tags: trunk
00:48
Remove an unnecessary memset(). check-in: e7b7f588 user: drh tags: trunk
2018-02-20
22:20
Make the walIndexPage() routine about 3x faster by factoring out the seldom used reallocation logic into a separate subroutine. check-in: e2b10714 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
  assert( n==1 || lockType!=F_RDLCK );

  /* Locks are within range */
  assert( n>=1 && n<=SQLITE_SHM_NLOCK );

  if( pShmNode->h>=0 ){
    /* Initialize the locking parameters */
    memset(&f, 0, sizeof(f));
    f.l_type = lockType;
    f.l_whence = SEEK_SET;
    f.l_start = ofst;
    f.l_len = n;

    rc = osFcntl(pShmNode->h, F_SETLK, &f);
    rc = (rc!=(-1)) ? SQLITE_OK : SQLITE_BUSY;
  }

  /* Update the global lock state and do debug tracing */
#ifdef SQLITE_DEBUG
  { u16 mask;







<




<







4176
4177
4178
4179
4180
4181
4182

4183
4184
4185
4186

4187
4188
4189
4190
4191
4192
4193
  assert( n==1 || lockType!=F_RDLCK );

  /* Locks are within range */
  assert( n>=1 && n<=SQLITE_SHM_NLOCK );

  if( pShmNode->h>=0 ){
    /* Initialize the locking parameters */

    f.l_type = lockType;
    f.l_whence = SEEK_SET;
    f.l_start = ofst;
    f.l_len = n;

    rc = osFcntl(pShmNode->h, F_SETLK, &f);
    rc = (rc!=(-1)) ? SQLITE_OK : SQLITE_BUSY;
  }

  /* Update the global lock state and do debug tracing */
#ifdef SQLITE_DEBUG
  { u16 mask;