Re: [sqlite] SQLite & stack size

2004-10-11 Thread Christian Smith
On Mon, 11 Oct 2004, D. Richard Hipp wrote: >Christian Smith wrote: >> >> Just run the test suite on NetBSD/sparc64, and test pagesize-2.3000.7 died >> with a SIGBUS. Full stack trace at bottom of mail[0]. >> >> #0 0x00108d80 in balance_nonroot (pPage=0x39dc10) >> at

Re: [sqlite] SQLite & stack size

2004-10-11 Thread D. Richard Hipp
Christian Smith wrote: Just run the test suite on NetBSD/sparc64, and test pagesize-2.3000.7 died with a SIGBUS. Full stack trace at bottom of mail[0]. #0 0x00108d80 in balance_nonroot (pPage=0x39dc10) at ../sqlite/src/btree.c:3045 3045p->aData = &((u8*)p)[-pBt->pageSize];

Re: [sqlite] SQLite & stack size

2004-10-11 Thread Christian Smith
On Fri, 3 Sep 2004, D. Richard Hipp wrote: >Christian Smith wrote: >> >> How often does the balancer run? >> > >No so much, it turns out. Long ago, it used to run a lot >more often and was a high runner. But I've since optimized >it out of a lot of situations. > >So allocating with malloc()

Re: [sqlite] SQLite & stack size

2004-09-03 Thread Miguel Angel Latorre Díaz
AIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 03, 2004 8:43 PM Subject: Re: [sqlite] SQLite & stack size > Christian Smith wrote: > > > > How often does the balancer run? > > > > No so much, it turns out. Long ago, it used to run a lot > mor

Re: [sqlite] SQLite & stack size

2004-09-03 Thread D. Richard Hipp
Christian Smith wrote: How often does the balancer run? No so much, it turns out. Long ago, it used to run a lot more often and was a high runner. But I've since optimized it out of a lot of situations. So allocating with malloc() isn't a big performance hit after all (at least not on systems

Re: [sqlite] SQLite & stack size

2004-09-03 Thread Curtis King
On 3-Sep-04, at 9:31 AM, Christian Smith wrote: How often does the balancer run? Could the space for the balance routine be allocated with the sqlite structure? It is opaque anyway, and is allocated only once, so there should be no penalty in performance over the current stack implementation,

Re: [sqlite] SQLite & stack size

2004-09-03 Thread Christian Smith
On Fri, 3 Sep 2004, D. Richard Hipp wrote: >b.bum wrote: > > What changed in SQLite3 such that the stack size is significantly larger for > > common operations? > > > >The balance routine needs 10x the page size of space to do its >job. That space needs to come from somewhere. I chose

Re: [sqlite] SQLite & stack size

2004-09-03 Thread b.bum
Thank you for the precise explanation -- very helpful. On Sep 3, 2004, at 8:19 AM, D. Richard Hipp wrote: alloca(), which does not work right on many systems. ... and would be on the stack anyway. b.bum

Re: [sqlite] SQLite & stack size

2004-09-03 Thread D. Richard Hipp
b.bum wrote: > What changed in SQLite3 such that the stack size is significantly larger for > common operations? > Version 3 supports databases with different page sizes. The routine in question (the "balance" routine in btree.c) has always needed stack space that is roughly 10x the size of one

[sqlite] SQLite & stack size

2004-09-03 Thread b.bum
On Sep 2, 2004, at 11:41 PM, Jakub Adamek wrote: Nuno, I am much surprised that version 3.0.5 helped you. It didn't help me. Neither my nor your port. BUT your remark helped me! You are right that it is because of stack space, and the default setting in Windows CE projects is 0x1, i.e. 65