Re: mamaMsg_toString & mamaMsg_freeString

Damian Maguire <d.maguire@...>

Hey Reed,

This was actually discussed a while ago on the mailing lists, after a question from Guy. At the time Frank responded and indicated that the mamaMsg_freeString function was deprecated and that the expectation (and current Qpid Proton bridge implementation) is that bridges will reuse a string buffer for performance reasons. You can see Frank's response to the original question in the chain here:

We also raised a Bugzilla ticket to mark freeString as completely deprecated. This is actually a bit more complex than it sounds, but is set to be resolved as part of the enum removal/vtable work, so we'd expect to get it cleaned up in the reasonably near future. You can actually see how this is to be implemented, and some of the complexity associated with it here:

Let me know if you have any other questions on this.



On 10/11/14 16:23, Alpert, Reed wrote:



Question on mamaMsg_toString & mamaMsg_freeString.


toString() calls into bridge impl, but freeString() just returns (is not available in the bridge impl mamaPayloadBridgeImpl).

Currently for Tick42 malloc is called in the toString(), and the user is expected to call free() when done with the buffer.


Is this the design intended for all bridges?






Reed Alpert | Corporate & Investment Bank | Market Data Services | J.P. Morgan | 4 Metrotech Center, 23rd Floor, Brooklyn, NY 11245 | T: 718.242.5198  | M: 917.414.4613 | reed.alpert@...


Alternate Contact:  CIB PIM Trading Technology Solutions NA | CIB_PIM_Trading_Technology_Solutions_NA@...


This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates. This transmission may contain information that is proprietary, privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. Please refer to for disclosures relating to European legal entities.

Join { to automatically receive all group messages.