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
Right now if we have a string attribute of at most 32 chars, it looks to me like ZAP allocates 32 bytes of storage for it both in the mutable attribute store and in the default value store.
Proposed Solution
In the default value store we could allocate less space: just enough to fit the actual value. This is particularly useful for the many strings that have empty string as default. Might save some .rodata.
One issue is whether that involves storing more state per-attribute in the attr descriptors, which will tend to bloat rodata. On the other hand, the default-value string stores its length anyway, so I don't think we need to add anything to the attr descriptors, just a bit of logic in the "determine the size in the default value store" code, I hope.
Pulls in changes to make the default attribute storage for strings
depend on the actual string value, not the maximum size of the value.
Fixesproject-chip#5927
Pulls in changes to make the default attribute storage for strings
depend on the actual string value, not the maximum size of the value.
Fixesproject-chip#5927
Problem
Right now if we have a string attribute of at most 32 chars, it looks to me like ZAP allocates 32 bytes of storage for it both in the mutable attribute store and in the default value store.
Proposed Solution
In the default value store we could allocate less space: just enough to fit the actual value. This is particularly useful for the many strings that have empty string as default. Might save some .rodata.
One issue is whether that involves storing more state per-attribute in the attr descriptors, which will tend to bloat rodata. On the other hand, the default-value string stores its length anyway, so I don't think we need to add anything to the attr descriptors, just a bit of logic in the "determine the size in the default value store" code, I hope.
@vivien-apple @jepenven-silabs @jmartinez-silabs
The text was updated successfully, but these errors were encountered: