Re: [sqlite] Regarding Memory Database

2009-08-28 Thread Pavel Ivanov
Can I ask you why do you need to allocate memsys5 memory pool in the first place? Why don't you use standard mallocs? Or even your own allocator? I just have a feeling that you're pursuing some goals very specific to your application and this kind of functionality is not necessary to anybody else.

Re: [sqlite] Regarding Memory Database

2009-08-27 Thread shankar m
Its not a problem in SQLite. I need a feature enhancement. Currently in SQLite i can allocate memory in a block. Example: 2.5MB memory for memsys5 memory pool. Here 2MB i am using for Mem Db and 0.5MB for heap and other DB cache. I want flexibility such that when i close mem db, the 2MB should b

Re: [sqlite] Regarding Memory Database

2009-08-27 Thread Pavel Ivanov
OK. So you have allocated memsys5 memory pool and now are complaining that this memory is not returned to OS? Sorry, but it's not quite understandable what do you want to achieve, what's the problem with it and how did you find that there's a problem. Pavel On Thu, Aug 27, 2009 at 6:11 AM, shank

Re: [sqlite] Regarding Memory Database

2009-08-27 Thread shankar m
I have allocated memory for SQLite heap and using memsys5 memory pool algorithm to manage the heap. So if free is called it will be added to free list of memsys5 memory pool. Regards Shankar On Wed, Aug 26, 2009 at 7:51 PM, Pavel Ivanov wrote: > And I mean that you're wrong in this vision. SQLi

Re: [sqlite] Regarding Memory Database

2009-08-26 Thread shankar m
I mean to say free to the OS so that it can use for other purpose. SQlite frees but maintains to the memory will be present in SQLite memory pool or heap. Not to the OS. Regards Shankar On Wed, Aug 26, 2009 at 7:15 PM, Pavel Ivanov wrote: > > SQLite currently does not support freeing of alloca

Re: [sqlite] Regarding Memory Database

2009-08-26 Thread Pavel Ivanov
And I mean that you're wrong in this vision. SQLite doesn't keep memory in pools if it doesn't belong to cache necessary to some open connection. At least SQLite calls free() which of course doesn't necessarily mean that memory will be returned to OS. Pavel On Wed, Aug 26, 2009 at 10:02 AM, shan

Re: [sqlite] Regarding Memory Database

2009-08-26 Thread Pavel Ivanov
> SQLite currently does not support freeing of allocated memory > unless it is shutdown. It seams to me that you're wrong in this conclusion or elaborate please how did you come to it. In fact SQLite always frees all memory related to connection (including cache) when you close it. And you can cle

[sqlite] Regarding Memory Database

2009-08-25 Thread shankar m
Hi, I am using SQLite in a embedded system which has the following databases 1. 64MB Flash stored Database for persistent storage 2. 2 MB In-Memory Database. When the Memory Database is closed the 2MB should be returned to the operating system. The 2 MB will be reallocated when the system