Issue 6852: Ref-167 Malloc_required_for_get_default_qos (data-distribution-ftf) Source: Real-Time Innovations (Dr. Gerardo Pardo-Castellote, Ph.D., gerardo(at)rti.com) Nature: Uncategorized Issue Severity: Summary: The problem is with the QoS that have dynamically-sized things inside, namely PARTITION (string) and USER_DATA (sequence). These fields force a "malloc" each time the structure is copied out (even if a pre-allocated structure is passed in) Moreover copies may also result in memory allocation and frees. Can't this be avoided? In the C mapping copies would then require the use of an explicit function rather than direct assignment One possibility would be to refactor the USER_DATA and PARTITION into a more generic NAME-value pair infrastructure. Allow these to be set with a different API (i.e. not by means of QoS, but as direct operation on the Entity). These avoids all the above problems ***PROPOSAL*** No concrete proposal yet Resolution: Revised Text: Actions taken: December 23, 2003: received issue Discussion: Resolution: The FTF recognizes it would be desirable to find a way to not force the use of dynamic memory. However, the FTF could not agree on a resolution to this issue and agreed to defer the issue for a future revision. Disposition: Deferred End of Annotations:===== ef-167 Malloc_required_for_get_default_qos The problem is with the QoS that have dynamically-sized things inside, namely PARTITION (string) and USER_DATA (sequence). These fields force a "malloc" each time the structure is copied out (even if a pre-allocated structure is passed in) Moreover copies may also result in memory allocation and frees. Can't this be avoided? In the C mapping copies would then require the use of an explicit function rather than direct assignment One possibility would be to refactor the USER_DATA and PARTITION into a more generic NAME-value pair infrastructure. Allow these to be set with a different API (i.e. not by means of QoS, but as direct operation on the Entity). These avoids all the above problems ***PROPOSAL*** No concrete proposal yet [OMG ISSUE# 6852] Ref-167 Malloc_required_for_get_default_qos The problem is with the QoS that have dynamically-sized things inside, namely PARTITION (string) and USER_DATA (sequence). These fields force a .malloc. each time the structure is copied out (even if a pre-allocated structure is passed in) Moreover copies may also result in memory allocation and frees. Can.t this be avoided? In the C mapping copies would then require the use of an explicit function rather than direct assignment One possibility would be to refactor the USER_DATA and PARTITION into a more generic NAME-value pair infrastructure. Allow these to be set with a different API (i.e. not by means of QoS, but as direct operation on the Entity). These avoids all the above problems ***PROPOSAL*** No concrete proposal yet