/ Check-in [94fde77b]
Login

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

Overview
Comment:Add a type identifier to argument sz to sqlite3PageMalloc() in pcache.c. Ticket #3383. (CVS 5713)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 94fde77b9a4efde5f7fb2a84fedaf38b0ebbac70
User & Date: danielk1977 2008-09-17 11:02:57
Context
2008-09-17
16:14
Changes to test scripts to support running on symbian. (CVS 5714) check-in: 6ef34e9d user: danielk1977 tags: trunk
11:02
Add a type identifier to argument sz to sqlite3PageMalloc() in pcache.c. Ticket #3383. (CVS 5713) check-in: 94fde77b user: danielk1977 tags: trunk
00:13
Fix for tickets #3378 and #3381 that preserves the aliasing optimization. And yet, this fix feels uncomfortable. Seeking an alternative... (CVS 5712) check-in: f8b759f1 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pcache.c.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file implements that page cache.
    13     13   **
    14         -** @(#) $Id: pcache.c,v 1.27 2008/09/15 15:36:58 drh Exp $
           14  +** @(#) $Id: pcache.c,v 1.28 2008/09/17 11:02:57 danielk1977 Exp $
    15     15   */
    16     16   #include "sqliteInt.h"
    17     17   
    18     18   /*
    19     19   ** A complete page cache is an instance of this structure.
    20     20   **
    21     21   ** A cache may only be deleted by its owner and while holding the
................................................................................
   430    430       if( p ){
   431    431         sz = sqlite3MallocSize(p);
   432    432         sqlite3StatusAdd(SQLITE_STATUS_PAGECACHE_OVERFLOW, sz);
   433    433       }
   434    434       return p;
   435    435     }
   436    436   }
   437         -void *sqlite3PageMalloc(sz){
          437  +void *sqlite3PageMalloc(int sz){
   438    438     void *p;
   439    439     pcacheEnterMutex();
   440    440     p = pcacheMalloc(sz, 0);
   441    441     pcacheExitMutex();
   442    442     return p;
   443    443   }
   444    444