"Rob Richardson" <[EMAIL PROTECTED]> wrote: > I'm thinking whether this is a memory leak or not sort of depends on > your definition. If a process is designed to remain open for long > periods of time with little activity, and it ends up taking up 1 > gigabyte of memory, that looks an awful lot like a leak to me. There > are likely to be at least three instances of this application running, > and after they all run for a month, they're likely to be consuming 5 > gigabytes of memory. This is not acceptable. If SQLite's sorted > query is taking up 2.5 megabytes of memory every time this piece of > the application is invoked, I need to know how to ensure that that > memory is released.
The test harness for SQLite counts the number of mallocs and frees and prints an error if the two do not match. This happens every time we run a test. We also run the test suite through valgrind prior to each release. The test scripts provide close to 100% test coverage. About 70% of the SQLite source code is devoted to testing. Because of the extensive testing outlined above, memory leaks in SQLite have never been a problem. Historically, whenever somebody comes forward with claims of memory leaks in SQLite, it generally works out to be memory leaks in their application. Based on prior experience and our extensive tests, claims that SQLite leaks 2.5MB of RAM every time it sorts are generally met with great skepticism. I won't say that it is impossible that SQLite is leaking memory, though it does seem unlikely. Certainly the claim that SQLite leaks 2.5MB on every sort is an extraordinary one, and extradinary claims require extraordinary proof. If you would like to submit a script or a short program that appears to cause SQLite to leak memory, we will be happy to look into the problem. But until I see an actual demonstration of the problem, I'm going to assume that the problem is really outside of SQLite and pay the matter no further attention. -- D. Richard Hipp <[EMAIL PROTECTED]> _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users