SQLite

Check-in [ea20f78edb]
Login

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

Overview
Comment:Fix malloc5.test so it work on both 64-bit and 32-bit systems. The ::tcl_platform(wordSize) variable has to be used to adjust some memory sizes. (CVS 6499)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ea20f78edb50778c40ed7f03f894ab898f58d67c
User & Date: drh 2009-04-11 19:09:54.000
Context
2009-04-13
08:14
updated Makefile.vxwSH4 and renamed it to Makefile.vxworks, should now be able to support SH4 and PPC targets. (CVS 6500) (check-in: e4a370c72d user: chw tags: trunk)
2009-04-11
19:09
Fix malloc5.test so it work on both 64-bit and 32-bit systems. The ::tcl_platform(wordSize) variable has to be used to adjust some memory sizes. (CVS 6499) (check-in: ea20f78edb user: drh tags: trunk)
16:27
Fix an obscure problem with recovery from I/O errors while rolling back. (CVS 6498) (check-in: 24ff486125 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/malloc5.test.
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
# Prior to version 3.6.2, calling sqlite3_release_memory() or exceeding
# the configured soft heap limit could cause sqlite to upgrade database 
# locks and flush dirty pages to the file system. As of 3.6.2, this is
# no longer the case. In version 3.6.2, sqlite3_release_memory() only
# reclaims clean pages. This test file has been updated accordingly.
#
# $Id: malloc5.test,v 1.21 2008/12/30 17:55:00 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl
source $testdir/malloc_common.tcl
db close

# Only run these tests if memory debugging is turned on.







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
# Prior to version 3.6.2, calling sqlite3_release_memory() or exceeding
# the configured soft heap limit could cause sqlite to upgrade database 
# locks and flush dirty pages to the file system. As of 3.6.2, this is
# no longer the case. In version 3.6.2, sqlite3_release_memory() only
# reclaims clean pages. This test file has been updated accordingly.
#
# $Id: malloc5.test,v 1.22 2009/04/11 19:09:54 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl
source $testdir/malloc_common.tcl
db close

# Only run these tests if memory debugging is turned on.
361
362
363
364
365
366
367



368

369
370
371
372
373
374
375
  sqlite3_release_memory 1000
  list [nPage db] [nPage db2]
} {9 3}
do_test malloc5-6.3.4 {
  # Now release 9900 more (about 9 pages worth). This should expunge
  # the rest of the db cache. But the db2 cache remains intact, because
  # SQLite tries to avoid calling sync().



  sqlite3_release_memory 9900

  list [nPage db] [nPage db2]
} {0 3}
do_test malloc5-6.3.5 {
  # But if we are really insistent, SQLite will consent to call sync()
  # if there is no other option. UPDATE: As of 3.6.2, SQLite will not
  # call sync() in this scenario. So no further memory can be reclaimed.
  sqlite3_release_memory 1000







>
>
>
|
>







361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
  sqlite3_release_memory 1000
  list [nPage db] [nPage db2]
} {9 3}
do_test malloc5-6.3.4 {
  # Now release 9900 more (about 9 pages worth). This should expunge
  # the rest of the db cache. But the db2 cache remains intact, because
  # SQLite tries to avoid calling sync().
  if {$::tcl_platform(wordSize)==8} {
    sqlite3_release_memory 10177
  } else {
    sqlite3_release_memory 9900
  }
  list [nPage db] [nPage db2]
} {0 3}
do_test malloc5-6.3.5 {
  # But if we are really insistent, SQLite will consent to call sync()
  # if there is no other option. UPDATE: As of 3.6.2, SQLite will not
  # call sync() in this scenario. So no further memory can be reclaimed.
  sqlite3_release_memory 1000