1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix a problem in test script malloc5.test. (CVS 4455)

FossilOrigin-Name: 028ec36c71d6ac43c8f1cda77578d844c6955f68
This commit is contained in:
danielk1977
2007-10-03 09:43:54 +00:00
parent ae72d98252
commit 8da6021be9
3 changed files with 25 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Add\sautomatic\srecovery\sfrom\sthe\spager\s"error-state".\sAlso\sadd\sa\snew\serror\scode\s-\sSQLITE_IOERR_NOMEM.\s(CVS\s4454)
D 2007-10-03T08:46:44
C Fix\sa\sproblem\sin\stest\sscript\smalloc5.test.\s(CVS\s4455)
D 2007-10-03T09:43:55
F Makefile.in cbfb898945536a8f9ea8b897e1586dd1fdbcc5db
F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@ -353,7 +353,7 @@ F test/malloc.test 17366a4f76e7aac14cd709e8209ef840cd497410
F test/malloc2.test 1506ab3a4490b38b8850a6fa3e12591235179872
F test/malloc3.test cf2efe9d16194276f227f34ac341019e013fb17d
F test/malloc4.test f0e5e0f639f61e2776a6c3f5308f836b3ad8b3c7
F test/malloc5.test b2fd56b369dd5884ad88edfaef41304393809125
F test/malloc5.test 18f3f71756e775a17ce4d0c49d76fb0027dda066
F test/malloc6.test d05fd71ef3c5983d10e0a6d728ea4a502a45a9e4
F test/malloc7.test 0d71bb6520b99934b551fa36a9c591404aeaad61
F test/malloc8.test addc27d907fec1af429551b95c72caa47fce2974
@ -580,7 +580,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
P 272959cc91d0c9299d6fca8a962eb563650af87b
R e48ace1bd2100159c32ec15d9bfa3f76
P 12eca32a6a3d68d5b20eed03afdffe7599e66014
R ab778c4ccea4851cfb45b8ff8e4ecac9
U danielk1977
Z d1e46257f1f89b59b016148eed84362d
Z 0b2e370c486d9ff351342955af404557

View File

@ -1 +1 @@
12eca32a6a3d68d5b20eed03afdffe7599e66014
028ec36c71d6ac43c8f1cda77578d844c6955f68

View File

@ -12,7 +12,7 @@
# This file contains test cases focused on the two memory-management APIs,
# sqlite3_soft_heap_limit() and sqlite3_release_memory().
#
# $Id: malloc5.test,v 1.16 2007/09/03 16:12:10 drh Exp $
# $Id: malloc5.test,v 1.17 2007/10/03 09:43:55 danielk1977 Exp $
#---------------------------------------------------------------------------
# NOTES ON EXPECTED BEHAVIOUR
@ -214,7 +214,23 @@ do_test malloc5-4.2 {
execsql {COMMIT;}
set nMaxBytes [sqlite3_memory_highwater 1]
puts -nonewline " (Highwater mark: $nMaxBytes) "
expr $nMaxBytes <= 100000
# We used to test ($nMaxBytes<100000), because the soft-heap-limit is
# 100000 bytes. But if an allocation that will exceed the
# soft-heap-limit is requested from within the only pager instance in
# the system, then there is no way to free memory and the limit has to
# be exceeded. An exception is memory allocated to store actual page
# data (the code contains a special case for this).
#
# This is not a problem because all allocations apart from those
# used to store cached page data are both small and transient.
#
# Summary: the actual high-water mark for memory usage may be slightly
# higher than the soft-heap-limit. The specific allocations that cause
# the problem are the calls to sqlite3_malloc() inserted into selected
# sqlite3OsXXX() functions in test builds.
#
expr $nMaxBytes <= 100100
} {1}
do_test malloc5-4.3 {
# Check that the content of table abc is at least roughly as expected.