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
The current way of handling memory allocation through a fixed CLAY_MAX_ELEMENT_COUNT macro constant has two major issues:
The UI may become larger than expected (for example a very long list of files) and there is no way to react to this at runtime.
If the macro is set to a large value in anticipation of such situations, memory would be wasted most of the time when those cases are rare.
Support should be added for either a more flexible memory allocation solution that adapts to the current number of elements (the library tells the user when to reallocate), or a reconfigurable maximum number of elements during runtime (the user code recognizes the exhaustion and reallocates).
The text was updated successfully, but these errors were encountered:
nicbarker
changed the title
Dynamic or runtime-configurable maximum element count
[Core] Dynamic or runtime-configurable maximum element count
Dec 24, 2024
100% agree on this one, I will have a PR up tomorrow to switch the define to a runtime configurable value, with an error hook function to notify the user when the memory has been exhausted 🙂
The current way of handling memory allocation through a fixed
CLAY_MAX_ELEMENT_COUNT
macro constant has two major issues:Support should be added for either a more flexible memory allocation solution that adapts to the current number of elements (the library tells the user when to reallocate), or a reconfigurable maximum number of elements during runtime (the user code recognizes the exhaustion and reallocates).
The text was updated successfully, but these errors were encountered: