Dave Gierok <[EMAIL PROTECTED]> wrote:
>
> I am running an in-memory db and am using the functionality where
> we override all the OS calls such that we implement our own memory
> management and file IO. Therefore, I am able to easily track the
> amount of memory Sqlite is taking up. I have noticed that when I
> call CREATE INDEX and then the corresponding DROP INDEX, I do not
> see the memory drop to the same level as it was before the CREATE
> INDEX. I also call VACUUM after DROP INDEX, which makes no difference.
>
I tried this using the built-in database functionality and the
memory is being freed there. I did:
CREATE TABLE t1(x);
INSERT INTO t1 VALUES('hello');
CREATE INDEX i1 ON t1(x);
DROP INDEX i1;
VACUUM;
And then set a breakpoint at pager.c:1972 where the freeing of
memory occurs, and it does happen.
But I have no way to trouble-shoot your overridden OS calls.
The first place I would look would be in your implementation
of sqlite3OsTruncate(). Are you sure you are doing it right?
Does sqlite3OsTruncate() get called when you VACUUM?
--
D. Richard Hipp <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------