Nuno,
Thanks for the excelent description of my error. I have learnt a little
more about Linux virtual memory model. Very glad to hear Sqlite is as
perfect as ever :)
My problem, which is definitely my problem, is that 90 x 16MB of
reserved memory is still a loss of 1.4G. Especially as I use hardly any
of it.
If you can drop me a hint about how to sort this, this would be
extremely useful. Otherwise I'll close this thread and look elsewhere...
Kind regards,
Ben Clewett.
Nuno Lucas wrote:
On 10/30/06, Ben Clewett <[EMAIL PROTECTED]> wrote:
Hi Numo and others,
I am very glad to hear the consensus is that there is nothing wrong with
libsqlite3.so.0.8.6.
However the fact is that the 'open' still acquires 16MB of memory.
Immediately Before:
VmSize: 8572 kB
VmLck: 0 kB
VmRSS: 2252 kB
VmData: 484 kB
VmStk: 88 kB
VmExe: 20 kB
VmLib: 6772 kB
VmPTE: 20 kB
Immediately After:
sqlite3_open(sDatabaseFile, &hSqlite) (= SQLITE_OK)
VmSize: 24960 kB
VmLck: 0 kB
VmRSS: 2368 kB
VmData: 16872 kB
VmStk: 88 kB
VmExe: 20 kB
VmLib: 6772 kB
VmPTE: 24 kB
I guess that info is from /proc/<pid>/status (the nomeclature somewhat
differs for other programs).
The program actually only allocated 2368-2252=116 KB, but reserved
16MB of virtual addresses (which is different from actual allocated
memory, as you can check by running free or other tool). That is
normal if it's the first file you open, as the kernel and libc reserve
a bunch of addresses before for internal buffers (to speed up your
I/O).
RSS (the Resident Set Size), is the important one here (unless your
program had parts of it swaped out, which would make it less usefull
for what we want).
Regards,
~Nuno Lucas
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
--
Ben Clewett
+44(0)1923 460000
Project Manager
Road Tech Computer Systems Ltd
http://www.roadrunner.uk.com
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------