Re: [sqlite] Re: Default sqlite memory management policy

2007-04-04 Thread Dan Kennedy
On Wed, 2007-04-04 at 23:36 -0400, Rich Rattanni wrote:
> On 4/3/07, Rich Rattanni <[EMAIL PROTECTED]> wrote:
> > All:
> >I was wondering exactly how SQLite handles freeing memory used
> > from the heap when compiled without SQLITE_ENABLE_MEMORY_MANAGEMENT?
> >
> >Will absolutely no memory be freed, or is there some default
> > memory management scheme used?
> >
> 
> Let me explain my question better...
> SQLITE on my system has been compiled without the
> SQLITE_ENABLE_MEMORY_MANAGEMENT define.  I have a thread that writes a
> hundred or so samples into a database every 30 seconds.  I do not open
> and close the database pointer each time, but I do prepare and
> finalize a statement for each transaction.  I have notices that the
> memory used by my program slowly but surely increases as the program
> runs (about 24 hrs sees a 40%+ increase in system memory).  I have
> checked, and rechecked the program for any memory leaks on my part,
> but I have no found any obvious ones.  I just wanted to know if
> sqlite, as compiled for my system, will use as much memory as it sees
> fit in a particular thread if compiled without
> SQLITE_ENABLE_MEMORY_MANAGEMENT?
> 
> Can anyone answer this for me?

Defining the SQLITE_ENABLE_MEMORY_MANAGEMENT includes the 
following APIs in the build:

  int sqlite3_release_memory(int N);
  int sqlite3_set_soft_heap_limit(int N);

See the comments above these two functions in sqlite3.h for
details.

SQLite should not leak memory whether this macro is defined
or not. How large are the leaks you are seeing?

Dan.



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



[sqlite] Re: Default sqlite memory management policy

2007-04-04 Thread Rich Rattanni

On 4/3/07, Rich Rattanni <[EMAIL PROTECTED]> wrote:

All:
   I was wondering exactly how SQLite handles freeing memory used
from the heap when compiled without SQLITE_ENABLE_MEMORY_MANAGEMENT?

   Will absolutely no memory be freed, or is there some default
memory management scheme used?



Let me explain my question better...
SQLITE on my system has been compiled without the
SQLITE_ENABLE_MEMORY_MANAGEMENT define.  I have a thread that writes a
hundred or so samples into a database every 30 seconds.  I do not open
and close the database pointer each time, but I do prepare and
finalize a statement for each transaction.  I have notices that the
memory used by my program slowly but surely increases as the program
runs (about 24 hrs sees a 40%+ increase in system memory).  I have
checked, and rechecked the program for any memory leaks on my part,
but I have no found any obvious ones.  I just wanted to know if
sqlite, as compiled for my system, will use as much memory as it sees
fit in a particular thread if compiled without
SQLITE_ENABLE_MEMORY_MANAGEMENT?

Can anyone answer this for me?

--
Thanks in advance,
Rich

P.S. Sorry to repost, if there are no takers I will not repost again,
I just thought my first message was lacking any real question so I
wanted to clarify the original.

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