Re[2]: [sqlite] SQLite and Large Databases

2007-11-08 Thread Teg
Hello drh,

Thursday, November 8, 2007, 3:03:07 PM, you wrote:

dhc> PokerAce <[EMAIL PROTECTED]> wrote:
>> I am using Windows Task Manager to determine memory usage.  I minimize my
>> application (which causes the task manager to show a more accurate
>> measurement of memory used) and still the memory usage is enormous.
>> 
>> 

dhc> Recompile version 3.5.2 with -DSQLITE_MEMORY_SIZE=1000
dhc> or however much memory you want SQLite to use.  This will
dhc> create a static array of char[] of size 1000 (or whatever
dhc> other size you give it) and use that instead of malloc()
dhc> to obtain all the memory it needs.  With this approach it
dhc> is impossible for SQLite to use more than the specified
dhc> amount of memory since it never calls malloc().

dhc> --
dhc> D. Richard Hipp <[EMAIL PROTECTED]>


dhc> 
-
dhc> To unsubscribe, send email to [EMAIL PROTECTED]
dhc> 
-

Win32 here. I set this option and get insta-crashes in both debug and
release builds. Using the latest 3.5.2 from the website.

-DSQLITE_MEMORY_SIZE=1000

It crashes right here when it was trying to push pager pages out.

int sqlite3OsWrite(sqlite3_file *id, const void *pBuf, int amt, i64 offset){
  DO_OS_MALLOC_TEST;
  return id->pMethods->xWrite(id, pBuf, amt, offset);
}


If you need more information let me know. It's not causing my any real
problems, I just disable the setting and it's back to normal.


-- 
Best regards,
 Tegmailto:[EMAIL PROTECTED]


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re[2]: [sqlite] SQLite and Large Databases

2007-11-08 Thread Teg
Hello Trevor,

Thursday, November 8, 2007, 5:48:59 PM, you wrote:

TT> On 11/8/07, PokerAce <[EMAIL PROTECTED]> wrote:

>> I am using Windows Task Manager to determine memory usage.  I minimize my
>> application (which causes the task manager to show a more accurate
>> measurement of memory used) and still the memory usage is enormous.

TT> Task Manager is lousy at getting the information you really need.  Try
TT> Process Explorer instead, and pay attention to the "Private Bytes"
TT> number for your process:
TT> http://www.microsoft.com/technet/sysinternals/utilities/processexplorer.mspx

TT> That said, it does sound like something is leaking memory, rather than
TT> SQLite just behaving as normal.  I would investigate detailed memory
TT> tracking options for your app, to find out where it's going.

TT> 
-
TT> To unsubscribe, send email to [EMAIL PROTECTED]
TT> 
-

You can turn on lots of additional columns for things like virtual
memory sizes and the like. The default details selection is
pretty lacking.

-- 
Best regards,
 Tegmailto:[EMAIL PROTECTED]


-
To unsubscribe, send email to [EMAIL PROTECTED]
-