List:MySQL++« Previous MessageNext Message »
From:Alex Burton Date:October 4 2006 10:31am
Subject:Re: mysql++ memory usage
View as plain text  
Thanks for your replies, Bill and Warren.

I can confirm that I am using Windows Task Manager and MS Visual C++  
7.1.

Although I take the point about Windows Task manager Including OS  
buffers etc, programs can be written with stable memory usage, and my  
program using mysql is not one of them.

The problem appears not to be a 'leak' as in unreferenced memory, but  
excessive usage.
Perhaps the mysql client api maintains it's own memory pool for some  
performance reasons etc.

Thanks for the link to the archives Bill, I didn't search for memory  
leaks, only for memory usage.

Alex

On 04/10/2006, at 12:44 PM, Bill K wrote:

> If you are using Visual Studio, the problem is some kind of memory  
> leak having to do with the query object. I haven't narrowed it  
> down, yet. I hope I have some time to look into deeper.
>
> Look at this thread for more info on it: http://lists.mysql.com/ 
> plusplus/5743
>
> Has anyone else had time to look into this memory leak? I barely  
> have time to read these emails, these days. =)
>
> BTW, Warren, you are doing a great job.
>
>
> Alex Burton wrote:
>> Hello,
>>
>> I have a simple logging application that needs to be able to run  
>> unattended and reliably for as long as possible.
>> The memory that it uses is increasing as it runs.
>>
>> Here is an simplified example that reproduces the problem.
>>
>> int main()
>> {
>> 		while (true)
>> 		{
>> 			Connection c;
>> 			c.connect("database","localhost","user","pass");
>> 			Query q = c.query();
>> 			q << "INSERT INTO table_name (field_1 , field_2) VALUES ( 1 ,  
>> 2 ) ;";
>> 			q.execute();
>> 		}
>> }
>>
>> This memory usage of this program gradually rises over time, and  
>> has reached tens of megabytes.
>>
>> It makes no difference if I move the connection out of the loop.
>>
>> I don't think that it is a memory 'leak' as leak detectors can't  
>> find any leaks.
>>
>> Is this normal ?
>>
>> Alex
>>
>>

Thread
mysqlpp and wchar_t problemgani b. c.2 Oct
  • Re: mysqlpp and wchar_t problemWarren Young2 Oct
    • mysql++ memory usageAlex Burton3 Oct
      • Re: mysql++ memory usageWarren Young4 Oct
      • Re: mysql++ memory usageBill K4 Oct
        • Re: mysql++ memory usageAlex Burton4 Oct
        • Re: mysql++ memory usageWarren Young4 Oct
          • Re: mysql++ memory usageBill K5 Oct
            • Re: mysql++ memory usageWarren Young5 Oct
              • Re: mysql++ memory usageAlex Burton6 Oct
                • Re: mysql++ memory usageAlex Burton6 Oct
                  • RE: mysql++ memory usageMatt Dargavel6 Oct
                    • Re: mysql++ memory usageWarren Young6 Oct
                      • Re: mysql++ memory usageAlex Burton7 Oct
                        • Re: mysql++ memory usageWarren Young7 Oct
                        • Re: mysql++ memory usageMatt Dargavel7 Oct
                          • Re: mysql++ memory usageWarren Young12 Oct
                            • Exporting classesMatt Dargavel19 Oct
                              • Re: Exporting classesWarren Young20 Oct
                                • RE: Exporting classesMatt Dargavel20 Oct
      • Re: mysql++ memory usageCarlos Flores4 Oct
    • Re: mysqlpp and wchar_t problemgani b. c.3 Oct