Re: [sqlite] Memory leak in csv.c virtual table module

2018-04-24 Thread Richard Hipp
Fixed now on trunk. Thanks for the bug report. On 4/24/18, Ralf Junker wrote: > This SQL causes a memory leak in the csv.c virtual table module: > >CREATE VIRTUAL TABLE if not exists t1 > USING csv(filename='FileDoesNotExists.csv'); > > Cause is that the zIn buffer

[sqlite] Memory leak in csv.c virtual table module

2018-04-24 Thread Ralf Junker
This SQL causes a memory leak in the csv.c virtual table module: CREATE VIRTUAL TABLE if not exists t1 USING csv(filename='FileDoesNotExists.csv'); Cause is that the zIn buffer which is allocated here: http://localhost:8081/artifact?name=1a009b93650732e2=128 is only freed in

Re: [sqlite] memory leak?

2018-04-13 Thread Peter Da Silva
It is normal in all modern operating systems for unused memory to be allocated to buffer cache, so over time the "free" memory Is expected to go down unless disk activity is near quiescent. Some operating systems will combine "cache" and "free" memory to hide this from the casual user, but I

Re: [sqlite] memory leak?

2018-04-12 Thread king3306
first thanks you reply After running for some time i found sqlite3_memory_used return value keep constant about 2M,but linux free memory is fewer and fewer,i make sure no other places are leaked,why? this whether or not a normal behavior? if not ,how can i to analysis this problem? Looking

Re: [sqlite] memory leak?

2018-04-12 Thread king3306
my platform is armv5 not support valgrind and lint, can you help me ? -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] memory leak?

2018-04-12 Thread king3306
thans your reply , when find the problem,i try to use valgrind tool,but i find this tools is not support armv5,i use mcu is AT91SAM9G25 -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list

Re: [sqlite] memory leak?

2018-04-12 Thread Tim Streater
On 12 Apr 2018, at 21:34, Simon Slavin wrote: > On 12 Apr 2018, at 8:00pm, Warren Young wrote: > >> Also: http://valgrind.org/docs/manual/faq.html#faq.pronounce > > I didn't know that. So they want it to be pronounced like 'lint'. > Interesting. That

Re: [sqlite] memory leak?

2018-04-12 Thread Simon Slavin
On 12 Apr 2018, at 8:00pm, Warren Young wrote: > Also: http://valgrind.org/docs/manual/faq.html#faq.pronounce I didn't know that. So they want it to be pronounced like 'lint'. Interesting. Simon. ___ sqlite-users mailing list

Re: [sqlite] memory leak?

2018-04-12 Thread Warren Young
On Apr 12, 2018, at 11:14 AM, Jens Alfke wrote: > > I'm a Mac/iOS developer so I use the 'leaks' tool and Instruments app; I > don't know how this is done on Linux. Valgrind: http://valgrind.org/ Also: http://valgrind.org/docs/manual/faq.html#faq.pronounce :)

Re: [sqlite] memory leak?

2018-04-12 Thread Jens Alfke
Trying to find memory leaks by looking at the OS memory statistics is pointless. It's like looking at satellite photos to find a dropped contact lens. :) The kernel's virtual memory system (on any modern OS) is very complex, and the behavior of malloc/free in a process is also complex. If you

Re: [sqlite] memory leak?

2018-04-12 Thread Richard Hipp
On 4/12/18, king3306 <1809860...@qq.com> wrote: > > 1: > before i use insert cmd ,the linux memory and sqlite3_memory_used is > linux: tota=29126656 used=16998400 free=12128256 > sqlite3_memory_used:1372576 > > after i use inset cmd ,the linux memory and sqlite3_memory_used is > linux:

Re: [sqlite] memory leak?

2018-04-12 Thread king3306
sorry i made a mistake SQLite version 3.3.6 is linux built-in sqlite3 i use is SQLITE_VERSION"3.22.0" on arm -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] memory leak?

2018-04-12 Thread Richard Hipp
On 4/12/18, king3306 <1809860...@qq.com> wrote: > > I am use SQLite version 3.3.6 Version 3.3.6 dates from 2006-06-06. Version 3.23.1 is current. Please upgrade. Report back if you are still having problems. -- D. Richard Hipp d...@sqlite.org ___

[sqlite] memory leak?

2018-04-12 Thread king3306
HI I am use SQLite version 3.3.6 default page_size is 4096 , i set 1024 i have four question ,i don't understand 1: before i use insert cmd ,the linux memory and sqlite3_memory_used is linux: tota=29126656 used=16998400 free=12128256 sqlite3_memory_used:1372576 after i use inset cmd ,the

Re: [sqlite] memory leak

2017-11-05 Thread Yuriy M. Kaminskiy
On 11/05/17 03:28 , Lev wrote: > I'm fighting with some memory leak. From time to time the vsize of the > process goes up with 100k. I have several function like this, and I > call them in each second. My memory growth happens every 10 minutes or > so. > > int dbSqliteSelectSensorsToReport(sdmd_t

[sqlite] memory leak

2017-11-04 Thread Lev
I'm fighting with some memory leak. From time to time the vsize of the process goes up with 100k. I have several function like this, and I call them in each second. My memory growth happens every 10 minutes or so. int dbSqliteSelectSensorsToReport(sdmd_t *sdmd, sensor_t *sensor, int deviceType,

[sqlite] Memory leak?

2015-03-16 Thread Matthias Schmitt
Hello, sorry for the late answer. My weekend was full of events. > On 13 Mar 2015, at 23:32, Gregory Moore wrote: > > Are you interacting directly with sqlite? Or are you using a 3rd party API > such as FMDB? I take it you are not using Core Data (which optionally can > use a sqlite

[sqlite] Memory leak?

2015-03-13 Thread Gregory Moore
Hi, Matt I also have an iPhone app which directly interacts with sqlite using its C language API. So, a few questions for you, to get a better idea of what?s happening: Are you interacting directly with sqlite? Or are you using a 3rd party API such as FMDB? I take it you are not using Core

[sqlite] Memory leak?

2015-03-13 Thread Simon Slavin
Okay. The hex you showed us doesn't represent ASCII characters, so the bug is not obviously leaking memory which contains the sort of data you'd be storing. Apart from a few sequences of 'ff00' I see no obvious patterns. How are you getting your SQLite library ? Are you calling a library

[sqlite] Memory leak?

2015-03-13 Thread Matthias Schmitt
Hello, thank you for your fast response. > On 12 Mar 2015, at 17:35, Richard Hipp wrote: > > Let's start with the basics: How do you know that the memory was in > fact leaked and is not instead simply being held for reuse? The Xcode development environment comes with a debugging tool named

[sqlite] Memory leak?

2015-03-13 Thread Scott Hess
On Fri, Mar 13, 2015 at 3:13 AM, Matthias Schmitt wrote: >> On 12 Mar 2015, at 17:35, Richard Hipp wrote: >> >> Let's start with the basics: How do you know that the memory was in >> fact leaked and is not instead simply being held for reuse? > > The Xcode development environment comes with a

[sqlite] Memory leak?

2015-03-12 Thread R.Smith
On 2015-03-12 06:21 PM, Matthias Schmitt wrote: > Hello, > > I know, I am touching a hot iron, when claiming that sqlite might have a > memory leak. But I am trying to debug memory leaks related to sqlite now > since 4 days and I am running against walls. Hi Matthias, Firstly, there are no

[sqlite] Memory leak?

2015-03-12 Thread Matthias Schmitt
Hello, I know, I am touching a hot iron, when claiming that sqlite might have a memory leak. But I am trying to debug memory leaks related to sqlite now since 4 days and I am running against walls. Here is my problem: - I am writing an iPhone app using iOS 8.2, Xcode 4.2, sqlite 3.8.8.3. -

[sqlite] Memory leak?

2015-03-12 Thread Simon Slavin
On 12 Mar 2015, at 4:21pm, Matthias Schmitt wrote: > - The memory leak appears in the iPhone simulator more often, than on an > original iPhone device, but it appears always. > > - The leak appears with totally different type of queries. It might be, that > a leak appears in a specific query

[sqlite] Memory leak?

2015-03-12 Thread Richard Hipp
On 3/12/15, Matthias Schmitt wrote: > Hello, > > I know, I am touching a hot iron, when claiming that sqlite might have a > memory leak. But I am trying to debug memory leaks related to sqlite now > since 4 days and I am running against walls. > Here is my problem: > > - I am writing an iPhone

[sqlite] Memory Leak in ext/misc/compress.c

2015-02-25 Thread Keith Medcalf
static void uncompressFunc( sqlite3_context *context, int argc, sqlite3_value **argv ){ const unsigned char *pIn; unsigned char *pOut; unsigned int nIn; unsigned long int nOut; int rc; int i; pIn = sqlite3_value_blob(argv[0]); nIn = sqlite3_value_bytes(argv[0]); nOut = 0;

Re: [sqlite] Memory leak in online backup api

2014-03-10 Thread Richard Hipp
On Mon, Mar 10, 2014 at 10:06 AM, techi eth wrote: > Any hint will help me to identify root cause of leak. > Statically link against SQLite. Compile with -g. Use the --leak-check=full option to valgrind. -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] Memory leak in online backup api

2014-03-10 Thread techi eth
Any hint will help me to identify root cause of leak. Thanks On Mon, Mar 10, 2014 at 2:58 PM, techi eth wrote: > Hi, > > I come across memory leak with sqlite3 online backup api (Leak detected by > valgrind tool). I have used reference code from below link for test. >

[sqlite] Memory leak in online backup api

2014-03-10 Thread techi eth
Hi, I come across memory leak with sqlite3 online backup api (Leak detected by valgrind tool). I have used reference code from below link for test. (Online backup for running database) http://www.sqlite.org/backup.html Please find below memory leak snapshot for reference. ==6084== 78,688 (880

[sqlite] memory leak in sqlite3_load_extension

2012-11-25 Thread a . furieri
Hi, I'm Sandro Furieri, developer and maintainer of libspatialite: https://www.gaia-gis.it/fossil/libspatialite/index While testing my own library under Valgrind I've casually noticed a very small memory leak caused by the sqlite3_load_extension and sqlite3_reset_auto_extension logic: 32 bytes

Re: [sqlite] memory leak in transactions

2012-11-16 Thread rui
Thanks for your reply. I am using version 1.0.79.0 of System.Data.sqlite Here is how i am using it, i only use executescalar and executenonquery, let me know if you want to see how i pass the parameters etc. RunBigtransaction() { using (IDbTransaction tran =

Re: [sqlite] memory leak in transactions

2012-11-16 Thread Joe Mistachkin
rui wrote: > > I am seeing explosive memory growth when i am using transactions using > System.Data.SQLite. > The best way to address this issue is to utilize "using" blocks for any SQLiteCommand, SQLiteDataReader, and SQLiteTransaction objects used. That way, you won't have to wait until

Re: [sqlite] memory leak in transactions

2012-11-15 Thread Rob Richardson
] On Behalf Of rui Sent: Thursday, November 15, 2012 12:21 PM To: sqlite-users@sqlite.org Subject: [sqlite] memory leak in transactions Hi, I am seeing explosive memory growth when i am using transactions using System.Data.SQLite. I see this when the transactions which were before taking fraction

[sqlite] memory leak in transactions

2012-11-15 Thread rui
Hi, I am seeing explosive memory growth when i am using transactions using System.Data.SQLite. I see this when the transactions which were before taking fraction of second, taking 15 sec for 50 row insert into a table. I have tried to use sqlite3_db_release_memory but that only frees upto 2mb

Re: [sqlite] Memory leak?

2011-07-13 Thread Anze Rozman
Some mistakes... * I use also PRAGMA cache_size=100 but the some problem On Wed, Jul 13, 2011 at 3:12 PM, Anze Rozman wrote: > Hi! > > I have an application which inserts into database most of the time. Problem > is that memory is decreasing. Aplication is in java and I

[sqlite] Memory leak?

2011-07-13 Thread Anze Rozman
Hi! I have an application which inserts into database most of the time. Problem is that memory is decreasing. Aplication is in java and I use Werner's sqlite wrapper - http://www.ch-werner.de/javasqlite/ (because of J2ME). I use method

Re: [sqlite] Memory leak in SQlite

2011-05-10 Thread Black, Michael (IS)
Hardingham [i...@omroth.com] Sent: Tuesday, May 10, 2011 7:17 AM To: General Discussion of SQLite Database Subject: EXT :[sqlite] Memory leak in SQlite Hey guys. I'm sure that this is to do with the way I am using SQLite. I do not have time to radically change my methodology at this point, but I do

Re: [sqlite] Memory leak in SQlite

2011-05-10 Thread Stephan Beal
On Tue, May 10, 2011 at 2:17 PM, Ian Hardingham wrote: > I'm sure that this is to do with the way I am using SQLite. I do not > have time to radically change my methodology at this point, but I do > need to fix a rather severe memory leak I'm having. > > i don't see any

[sqlite] Memory leak in SQlite

2011-05-10 Thread Ian Hardingham
Hey guys. I'm sure that this is to do with the way I am using SQLite. I do not have time to radically change my methodology at this point, but I do need to fix a rather severe memory leak I'm having. (My apologies for the code) Any help is much appreciated. I query like this: int

Re: [sqlite] Memory leak in sqlite 3.7.0

2010-07-28 Thread Andy Gibbs
On Tuesday, July 27, 2010 6:43 PM, Richard Hipp wrote: >> [ ... ] >> >> However, I have also attached journaltest2.log which I think does >> demonstrate the memory leak. Having trawled through the full log file, >> it >> seems that the memory leak is coming from the FTS3 tests, so the >>

Re: [sqlite] Memory leak in sqlite 3.7.0

2010-07-27 Thread Richard Hipp
On Mon, Jul 26, 2010 at 11:16 AM, Andy Gibbs wrote: > On Monday, July 26, 2010 4:44 PM, Richard Hipp wrote: > > > What do you get when you run: >> >> ./testfixture test/permutations.test journaltest test/memsubsys2.test >> ./testfixture test/permutations.test

Re: [sqlite] Memory leak in sqlite 3.7.0

2010-07-27 Thread Andy Gibbs
On Monday, July 26, 2010 4:44 PM, Richard Hipp wrote: What do you get when you run: ./testfixture test/permutations.test journaltest test/memsubsys2.test ./testfixture test/permutations.test inmemory_journal test/memsubsys2.test Please find the log files attached as journaltest.log

Re: [sqlite] Memory leak in sqlite 3.7.0

2010-07-26 Thread Richard Hipp
What do you get when you run: ./testfixture test/permutations.test journaltest test/memsubsys2.test ./testfixture test/permutations.test inmemory_journal test/memsubsys2.test On Mon, Jul 26, 2010 at 9:47 AM, Andy Gibbs wrote: > Hi, > > I'm afraid I believe I

[sqlite] Memory leak in sqlite 3.7.0

2010-07-26 Thread Andy Gibbs
Hi, I'm afraid I believe I have observed a memory leak when running the full test suite that is part of sqlite 3.7.0. I have a log file generated from running the test suite which I can send if it is of interest to the developers - it is 5Mb compressed so I didn't think it fair to just post

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Igor Tandetnik
Zachary Turner wrote: > I still don't understand the transactions. For example, I issue a > single BEGIN at the start of my application and then insert about > 500MB of data through many small inserts (about 4KB each). During > this whole time I never issue a commit.

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Zachary Turner
On Wed, Jul 22, 2009 at 1:42 PM, Pavel Ivanov wrote: > > Again, try to call sqlite3_memory_used() several times during work of > your application. What does it say to you? It says it's using about 3MB. Which suggests maybe it's my application. I believe I've identified the

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Pavel Ivanov
> Assuming I don't do any manual commits, what does sqlite do with the > data that has yet to be committed? If you don't do commits (and "begins") of transactions by yourself then SQLite does that automatically after each executed statement. So when sqlite3_step returns you can be sure that

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Zachary Turner
On Wed, Jul 22, 2009 at 10:47 AM, Pavel Ivanov wrote: > SQLite synchronizes with disk during every commit (either issued by > yourself or automatic) at least 2 times (I don't know exact number). > So it's quite natural that it spends most of the time in winSync(). > But I still

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Marcus Grimm
just a point: In your pseudocode you precreate statements for the begin and commit and trying to reuse them later on. If your real code is like this I would suggest to take a look at this. I think it is not possible to "re-step" a begin or commit, you may try to recreate these statements

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Pavel Ivanov
SQLite synchronizes with disk during every commit (either issued by yourself or automatic) at least 2 times (I don't know exact number). So it's quite natural that it spends most of the time in winSync(). But I still didn't understand from your explanation how exactly your application works and

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Zachary Turner
On Tue, Jul 21, 2009 at 6:45 PM, Pavel Ivanov wrote: >> If I remove or comment out the >> three lines with //* in the code above, I get no memory leaks. > > So basically you're saying that if you don't insert any data into your > database and thus effectively don't do with your

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-21 Thread Pavel Ivanov
> If I remove or comment out the > three lines with //* in the code above, I get no memory leaks. So basically you're saying that if you don't insert any data into your database and thus effectively don't do with your database anything and thus SQLite don't have to cache anything from database

[sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-21 Thread Zachary Turner
Hello, I'm a bit new to sqlite, I wonder if someone can advise me here. I'm using the Sqlite C/C++ interfaces, and I'm trying to do some very basic things. Currently I'm just creating a database with 1 table, and this table has 1 column of type blob. I then read some data out of a file and

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-29 Thread Greg Morehead
, June 29, 2009 12:06 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1 > So it seems by best bet is to close and open the connection once every 5 > minutes or so? While this might "work", I don't think you should resort to

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-29 Thread Simon Slavin
On 29 Jun 2009, at 1:11pm, Greg Morehead wrote: > So it seems by best bet is to close and open the connection once > every 5 minutes or so? No. The library is unlikely to have a leak of that kind in. Are you certain that what you're seeing is a real leak ? If so, the leak may be in

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-29 Thread Eric Minbiole
> So it seems by best bet is to close and open the connection once every 5 > minutes or so? While this might "work", I don't think you should resort to that. As Kees noted earlier, there will be performance drawbacks if you close/re-open the database. As others have indicated, the heap

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-29 Thread Jay A. Kreibich
e-users-boun...@sqlite.org]on Behalf Of Jay A. Kreibich > Sent: Friday, June 26, 2009 5:32 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1 > > > On Fri, Jun 26, 2009 at 05:07:16PM -0400, Greg Morehead scratched on the wall: &

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-29 Thread Greg Morehead
] Memory leak with sqlite3_exec on qnx 6.4.1 On Fri, Jun 26, 2009 at 05:07:16PM -0400, Greg Morehead scratched on the wall: > > If I close then reopen the database all my memory is recovered. > > Is this by design??? I was intending on keeping a connection open most of > time.

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-29 Thread Greg Morehead
: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1 On Fri, 26 Jun 2009 17:07:16 -0400, "Greg Morehead" <gmoreh...@premiumpower.com> wrote: > >If I close then reopen the database all my memory is recovered. > >Is this by design??? Yes, what you see is p

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Jay A. Kreibich
On Fri, Jun 26, 2009 at 05:07:16PM -0400, Greg Morehead scratched on the wall: > > If I close then reopen the database all my memory is recovered. > > Is this by design??? I was intending on keeping a connection open most of > time. Are you sure you're not looking at the page cache?

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Kees Nuyt
On Fri, 26 Jun 2009 17:07:16 -0400, "Greg Morehead" wrote: > >If I close then reopen the database all my memory is recovered. > >Is this by design??? Yes, what you see is probably the page cache. >I was intending on keeping a connection open most of time.

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Greg Morehead
, June 26, 2009 4:41 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1 FYI. I replaced the sqlite3_exec call with sqlite3_prepare_v2, sqlite3_step, sqlite3_finalize. Same results. -Original Message- From: sqlite-users-boun

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Greg Morehead
Discussion of SQLite Database Subject: Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1 Based on the documentation in the link you sent I should only need to call free if there was an error message. But, since there is no harm in calling sqlite3_free on a null pointer I moved it out

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Greg Morehead
: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]on Behalf Of Ribeiro, Glauber Sent: Friday, June 26, 2009 4:17 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1 I took only a quick look, but it seems to me

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Greg Morehead
larger real db's I am planning on using. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]on Behalf Of D. Richard Hipp Sent: Friday, June 26, 2009 3:58 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Memory leak

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Ribeiro, Glauber
, June 26, 2009 2:49 PM To: sqlite-users@sqlite.org Subject: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1 The extremely simple app below leaks. What am I doing wrong?? Please help. #include #include #include "stdio.h" #include "sqlite3.h" #include #define TFQ_SQL_

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread D. Richard Hipp
On Jun 26, 2009, at 3:49 PM, Greg Morehead wrote: > The extremely simple app below leaks. What am I doing wrong?? > Please help. How do you know it is leaking memory? How are you measuring? > > > #include > #include > #include "stdio.h" > #include "sqlite3.h" > #include > > #define

[sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Greg Morehead
The extremely simple app below leaks. What am I doing wrong?? Please help. #include #include #include "stdio.h" #include "sqlite3.h" #include #define TFQ_SQL_DB_NAME "/powerblock/datalog/TFQ-test.db" #define _TABLE_NAME "sqltest" int main(int argc, char *argv[]) { char sql[1024];

Re: [sqlite] Memory Leak on select ?

2008-03-27 Thread Igor Tandetnik
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm using sqlite3 on embedded system. > I've got a very very large > memory usage. > > zSql = > sqlite3_mprintf("SELECT PortNumber, RangeMin, RangeMax, Offset, MinL, > MinLL, MaxH, MaxHH, Delay, Hysteresis, " \ >"Alarm,

[sqlite] Memory Leak on select ?

2008-03-27 Thread [EMAIL PROTECTED]
I'm using sqlite3 on embedded system. I've got a very very large memory usage. My program must loop to show some values catched from a table using SELECT statement. In a while memory usage grow over phisical RAM, so my device lock. If I run the same code on a PC after some minutes the

Re: [sqlite] memory leak on sqlite3_open

2008-01-04 Thread drh
arbalest06 <[EMAIL PROTECTED]> wrote: > > Is this a valid memory leak? > No, it is not a real leak. But we used to get complaints about it about ever week so I reworked the code to make Valgrind stop complaining. That happened about 6 months ago. If you run with the latest version of SQLite

[sqlite] memory leak on sqlite3_open

2008-01-04 Thread arbalest06
Good day! I have a C function that would open a database. But when i ran it in valgrind, it gave me the following leak: ==7230== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 16 from 1) ==7230== malloc/free: in use at exit: 272 bytes in 2 blocks. ==7230== malloc/free: 289 allocs, 287

[sqlite] Memory leak in 3.3.14 & 3.3.15

2007-04-10 Thread Juri Wichanow
With Windows we found a memory leak in Exclusive access mode. Doing just selects sqlite takes more and more memory. With the same code in Normal access mode we do not have any memory leaks. Did anyone else find this, too? We haven't had similar problems with older versions, yet. Thanks Juri

Re: [sqlite] memory leak

2006-08-02 Thread Martin Jenkins
Hi, I think you're going to have to be a bit more rigorous about what you're testing if you're hoping for a fix. In your root message you posted a bit of code and said you'd found a leak in v2.8.17 of the library. Then you said the leak was present in v2.8.17 and v3.3.6 (the valgrind of 'bash'

Re: [sqlite] memory leak

2006-08-02 Thread mycmos
--- [EMAIL PROTECTED] wrote: > It appears that you are in fact running /bin/bash, > not > SQLite, and finding memory leaks there. Perhaps > "sqlite3" > is really a shell script on your system. Try > running > valgrind on a real sqlite3 executable and I believe > you > will find that there are

RE: [sqlite] memory leak

2006-08-02 Thread Brannon King
One quick question, is that with memory management enabled in the sqlite compile or not? I've done some extensive memory checking with memory management disabled and never found a leak. However, with memory management enabled, all bets are off. > I believe the memory leak exists. The following is

Re: [sqlite] memory leak

2006-08-02 Thread drh
mycmos <[EMAIL PROTECTED]> wrote: > > I believe the memory leak exists. The following is > excerpt from sqlite-3.3.6 in valgrind (In fact, the > sqlite-2.8.17 in valgrind is similar): > > [EMAIL PROTECTED] /data/lfs/sqlite-3.3.6]# valgrind > --leak-check=full ./sqlite3 [...] > ==11765== >

Re: [sqlite] memory leak

2006-08-02 Thread mycmos
--- Martin Jenkins <[EMAIL PROTECTED]>写道: > mycmos wrote: > > When I use cat /proc/meminfo, I found the MemFree > is > > decreasing. Does that means some degree memory > leak to > > Sqlite2.8.17? > > No. ;) > > If you run "ps -ef" or "top" you'll see a list of > all of the processes > running

Re: [sqlite] memory leak

2006-07-27 Thread Peter Weilbacher
mycmos wrote: > I am using sqlite2.8.17 for linux2.6. My program > is as following: > > int main() > { >sqlite *db; > >while(1){ > db = sqlite_open("./example.db",0777,0); > if(db == 0){ > printf("Could not open database."); > exit(1); > } >

Re: [sqlite] memory leak

2006-07-27 Thread Martin Jenkins
mycmos wrote: > When I use cat /proc/meminfo, I found the MemFree is > decreasing. Does that means some degree memory leak to > Sqlite2.8.17? No. ;) If you run "ps -ef" or "top" you'll see a list of all of the processes running on your machine. How could you associate changes in MemFree with

[sqlite] memory leak

2006-07-26 Thread mycmos
Hi all, I am using sqlite2.8.17 for linux2.6. My program is as following: int main() { sqlite *db; while(1){ db = sqlite_open("./example.db",0777,0); if(db == 0){ printf("Could not open database."); exit(1); } sleep(2);

[sqlite] RE:Re: [sqlite] RE:Re: [sqlite] RE:Re: [sqlite] RE: SQLite memory leak on Windows CE

2006-03-17 Thread [EMAIL PROTECTED]
17, 2006 7:08 AM Subject: [sqlite] RE:Re: [sqlite] RE:Re: [sqlite] RE: SQLite memory leak on Windows CE Hi Robert, I was talking about 3 selects satements using the same connections. Anyway, thank you very much for your advice of using PRAGMA cache size=8, that solved all the problems related

[sqlite] RE:Re: [sqlite] RE:Re: [sqlite] RE: SQLite memory leak on Windows CE

2006-03-17 Thread [EMAIL PROTECTED]
Hi Robert, I was talking about 3 selects satements using the same connections. Anyway, thank you very much for your advice of using PRAGMA cache size=8, that solved all the problems related to sqlite3_exec memory problems with a select statement, baut the memory problems are not solved at all,

Re: [sqlite] RE:Re: [sqlite] RE: SQLite memory leak on Windows CE

2006-03-16 Thread John Stanton
] RE:Re: [sqlite] RE: SQLite memory leak on Windows CE - Original Message - From: <[EMAIL PROTECTED]> I have run your program on the CE emulator (Pocket PC 2003) and i got the same memory leak. I have inserted 2 buttons on a MFC dialog application. The first button executes you

[sqlite] RE:Re: [sqlite] RE:Re: [sqlite] RE: SQLite memory leak on Windows CE

2006-03-16 Thread [EMAIL PROTECTED]
Hi, Thank you very much for your help, i have modify the line, it compiles, it doesn´t fire any exception, but memory is not freed at all (works the same way) Anyone has another idea?, i tought that SQLite was working since a long time ago on Windows CE devices, it seems quite strange that no

[sqlite] RE:Re: [sqlite] RE:Re: [sqlite] RE: SQLite memory leak on Windows CE

2006-03-16 Thread [EMAIL PROTECTED]
Hi Robert, I was talking about 3 selects satements using the same connections. Anyway, thank you very much for your advice of using PRAGMA cache size=8, that solved all the problems related to sqlite3_exec memory problems with a select statement, baut the memory problems are not solved at all,

[sqlite] RE:Re: [sqlite] RE: SQLite memory leak on Windows CE

2006-03-16 Thread [EMAIL PROTECTED]
Hi Again Robert, I have run your program on the CE emulator (Pocket PC 2003) and i got the same memory leak. I have inserted 2 buttons on a MFC dialog application. The first button executes your code and the second button closes the application. If you examine the memory you will discover that

[sqlite] RE:Re: [sqlite] RE: SQLite memory leak on Windows CE

2006-03-15 Thread [EMAIL PROTECTED]
Hi Robert, Thank you for your test. I have not test it on the emulator but in 4 different Windows CE devices i have at work (with different Windows CE OS versions) and it always give me the same memory leak result. I will run your test tomorrow at work using the emulator and i will let you know

[sqlite] RE:[sqlite] RE:Re: [sqlite] RE: SQLite memory leak on Windows CE

2006-03-15 Thread [EMAIL PROTECTED]
Hi again Robert, I think i forgot to tell you that to detect the memory leak you must not close the application testing program, the easiest way to detect the memory leak is: create a simple MFC dialog project. Add 2 buttons, one for executing your testing program an another one for close the

[sqlite] RE:Re: [sqlite] RE: SQLite memory leak on Windows CE

2006-03-15 Thread [EMAIL PROTECTED]
Hi Robert, Thank you for your test. I have not test it on the emulator but in 4 different Windows CE devices i have at work (with different Windows CE OS versions) and it always give me the same memory leak result. I will run your test tomorrow at work using the emulator and i will let you

Re: [sqlite] RE: SQLite memory leak on Windows CE

2006-03-15 Thread Robert Simpson
Ok, here's what I did ... On the desktop I created a SQLite database with one table and inserted 120,000 rows into it. I then copied it over to the CE emulator. Then I ran the following code on the CE (Pocket PC 2003 SE) emulator: #include #include #include "sqlite3.h" int WINAPI

Re: [sqlite] RE: SQLite memory leak on Windows CE

2006-03-15 Thread Robert Simpson
] RE: SQLite memory leak on Windows CE Hi again, i have tried your advice of changing line 192 at table.c and it didn´t work (it fires an exception). I do not think that the problem is related to sqlite3_get_table or sqlite3_free_table source code. To make sure, i have test it with another si

[sqlite] RE: SQLite memory leak on Windows CE

2006-03-15 Thread [EMAIL PROTECTED]
Hi again, i have tried your advice of changing line 192 at table.c and it didn´t work (it fires an exception). I do not think that the problem is related to sqlite3_get_table or sqlite3_free_table source code. To make sure, i have test it with another simple program (see the source code

Re: [sqlite] RE:Re: [sqlite] SQLite memory leak on Windows CE

2006-03-15 Thread Jose Da Silva
On March 14, 2006 01:49 pm, [EMAIL PROTECTED] wrote: > Hello again, > Thank for your answers: > first of all thank you who pointed that i should use a close(db) at > line 17 and call sqlite3_free_table(result) even if there was an > error, but these solutions didn´t solve my problem (the

Re: [sqlite] RE:Re: [sqlite] SQLite memory leak on Windows CE

2006-03-14 Thread Jay Sprenkle
On 3/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello again, > Thank for your answers: > first of all thank you who pointed that i should use a close(db) at line 17 > and call sqlite3_free_table(result) even if there was an error, but these > solutions didn´t solve my problem (the

[sqlite] RE:Re: [sqlite] SQLite memory leak on Windows CE

2006-03-14 Thread [EMAIL PROTECTED]
Hello again, Thank for your answers: first of all thank you who pointed that i should use a close(db) at line 17 and call sqlite3_free_table(result) even if there was an error, but these solutions didn´t solve my problem (the execution code never reached that point because ret value was always

Re: [sqlite] SQLite memory leak on Windows CE

2006-03-14 Thread Jose Da Silva
On March 14, 2006 12:03 pm, [EMAIL PROTECTED] wrote: > Hi all, > I am having real problems with SQLite on Windows CE (.NET 4.1 and > Pocket PC 2003). I have tried everything and it seems that there is a > memory leak with SQLite on Windows CE. I have test it with SQLite > versions 3.2.2 and 3.3.4

Re: [sqlite] SQLite memory leak on Windows CE

2006-03-14 Thread John Stanton
You might look to recoding your application to not use get_table, a memory hog. Instead use step in a loop. Jay Sprenkle wrote: On 3/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi all, I am having real problems with SQLite on Windows CE (.NET 4.1 and Pocket PC 2003). ret =

Re: [sqlite] SQLite memory leak on Windows CE

2006-03-14 Thread Jay Sprenkle
On 3/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi all, > I am having real problems with SQLite on Windows CE (.NET 4.1 and Pocket PC > 2003). > ret = sqlite3_get_table(db, SELECT * FROM artic, result, > rows, cols, errmsg); > if (ret != SQLITE_OK) > { > MessageBox(_T(Error en

[sqlite] SQLite memory leak on Windows CE

2006-03-14 Thread [EMAIL PROTECTED]
Hi all, I am having real problems with SQLite on Windows CE (.NET 4.1 and Pocket PC 2003). I have tried everything and it seems that there is a memory leak with SQLite on Windows CE. I have test it with SQLite versions 3.2.2 and 3.3.4 and SQLite seems that it reserves memory and doesn´t free

  1   2   >