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
Currently, the library allocates a new buffer for every incoming message (ie. every call to ReadStreamMessage) which may allocate a buffer up to length max(uint32), if that's what's passed by the caller. This is bad because many successive or concurrent reads can cause us to run out of memory resulting in a program crash. Also memory allocation uses a lot of CPU, which may be an issue depending on the application.
The library should only allocate up to a certain amount of buffers, and add them to a pool for re-use. The maximum size/amount of buffers should be configurable by the user of the lib.
The text was updated successfully, but these errors were encountered:
Currently, the library allocates a new buffer for every incoming message (ie. every call to
ReadStreamMessage
) which may allocate a buffer up to lengthmax(uint32)
, if that's what's passed by the caller. This is bad because many successive or concurrent reads can cause us to run out of memory resulting in a program crash. Also memory allocation uses a lot of CPU, which may be an issue depending on the application.The library should only allocate up to a certain amount of buffers, and add them to a pool for re-use. The maximum size/amount of buffers should be configurable by the user of the lib.
The text was updated successfully, but these errors were encountered: