You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The senml_json_serialize function uses a statically allocated buffer (uint8_t bufferJSON[PRV_JSON_BUFFER_SIZE];), which may not be sufficient for operations involving multiple resources or large data sets, for example reading an object with multiple instances.
Issue
If the serialized data exceeds the PRV_JSON_BUFFER_SIZE, serialization failures occur, affecting the ability of the protocol to efficiently handle larger or multiple resource transmissions.
Suggested Enhancement
Consider implementing dynamic buffer allocation or a more flexible buffer management strategy to accommodate varying payload sizes, enabling robust and scalable data management according to LwM2M specifications.
Would appreciate further insights or suggestions on this approach.
The text was updated successfully, but these errors were encountered:
I suppose it was implemented that way because of the use of Wakaama in embedded systems.
It's often considered bad practice to dynamically allocate memory in embedded systems. Some of the reasons are memory fragmentation and out of memory problems. In some cases, dynamic memory is only allocated at startup to recognise memory problems early.
Generally we have some use of dynamic memory allocation in Wakaama. We should just use it sprasingly and with care.
Description
The
senml_json_serialize
function uses a statically allocated buffer (uint8_t bufferJSON[PRV_JSON_BUFFER_SIZE];
), which may not be sufficient for operations involving multiple resources or large data sets, for example reading an object with multiple instances.Issue
If the serialized data exceeds the
PRV_JSON_BUFFER_SIZE
, serialization failures occur, affecting the ability of the protocol to efficiently handle larger or multiple resource transmissions.Suggested Enhancement
Consider implementing dynamic buffer allocation or a more flexible buffer management strategy to accommodate varying payload sizes, enabling robust and scalable data management according to LwM2M specifications.
Would appreciate further insights or suggestions on this approach.
The text was updated successfully, but these errors were encountered: