Repository navigation
Increase buffer size from 200 to 32767 - #90
RebeccaBecky wants to merge 1 commit into
Conversation
To fully support lsi records
|
Increasing the buffer size works for my use case but I don't know if this could have any unintended consequences. |
|
Just recently ran into this long string autosave limitation, thank you for fixing it! From a brief glance at the code, your fix should be fine. This could be a problem for embedded system that don't have much stack space |
|
Thanks for having a look! That's a very good point about the stack usage. Would it be preferable to try and use a dynamic array? |
Well, especially on embedded systems you'd like to avoid Not sure about the best answer. Keep a fixed Maybe define Or just prominently mention the |
|
Note that calloc() is already being used for long strings in 2 places: autosave/asApp/src/save_restore.c Line 1338 in 5e5957b autosave/asApp/src/save_restore.c Line 1523 in 5e5957b BUF_SIZE is being used for different kinds of buffers, some of which are not used for long strings. We could create a new LONG_STRING_BUFF_SIZE which is used only for long strings. One possibility might be to allocate the buffer as part of the chlist structure: autosave/asApp/src/save_restore.c Line 216 in 5e5957b The would result in one large buffer per save set. But there are typically only a few save sets open, so the total memory impact would be small, and it is not on the stack. One would need to look at the threading to make sure the list is not being used by multiple threads, but if it is it should already be protected by a mutex. |
To fully support lsi records