You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by gcutuli <gi...@numonyx.com> on 2010/11/16 16:33:16 UTC

qpid::messaging decode memory leak

I've an application that is acting as "subscriber": it simply fetches
incoming messages from a queue and decodes them using:
decode(msg, map);
where msg is a qpid-Message object and map is a Variant::Map object.
After a number of incoming messages, this method produces a memory leak of 4
bytes and the overall memory used by the application continues to grow...
Can you help me?
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/qpid-messaging-decode-memory-leak-tp5744226p5744226.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


RE: qpid::messaging decode memory leak

Posted by gcutuli <gi...@numonyx.com>.
My environment is:
- Win XP/SP3
- QPID messaging 0.7
- c++ under VS2008 Express Edition

I monitored Task Manager during the execution of the application, and I
noticed that, after a number of calls to "decode",  the used memory
increased by 4 bytes.
This is the code I wrote:

string MQPIDHelper::GetMsgContent(Message msg)
{				
	Variant::Map fields;
	decode(msg, fields);
	Variant::Map msgBody(fields["Body"].asMap());		
	msgBody["content"].asString();
	return msgBody["content"].asString();				
}

where MQPIDHelper is a static class.

Please note that I need to decode the message (msg) to retrieve its content
as map.
"GetMsgContent" is invoked every time a new message is fetched from the
queue.
I tried to execute a scenario were a publisher send thousands of messages
and the subscribers just receive and log them. 
Thank you.
Giuseppe
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/qpid-messaging-decode-memory-leak-tp5744226p5744528.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


RE: qpid::messaging decode memory leak

Posted by Steve Huston <sh...@riverace.com>.
Could you please tell us what Qpid version you are using, what OS, and
what information led you to conclude a 4-byte leak? Also, if you could
include the code you are using that would be helpful.

Thanks,
-Steve

--
Steve Huston, Riverace Corporation
Total Lifecycle Support for Your Networked Applications
http://www.riverace.com


> -----Original Message-----
> From: gcutuli [mailto:giuseppe.cutuli@numonyx.com] 
> Sent: Tuesday, November 16, 2010 10:33 AM
> To: users@qpid.apache.org
> Subject: qpid::messaging decode memory leak
> 
> 
> 
> I've an application that is acting as "subscriber": it simply 
> fetches incoming messages from a queue and decodes them 
> using: decode(msg, map); where msg is a qpid-Message object 
> and map is a Variant::Map object. After a number of incoming 
> messages, this method produces a memory leak of 4 bytes and 
> the overall memory used by the application continues to 
> grow... Can you help me?
> -- 
> View this message in context: 
> http://apache-qpid-users.2158936.n2.nabble.com/qpid-messaging-
> decode-memory-leak-tp5744226p5744226.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
> 
> 


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org