1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00
libwebsockets/lwsws
Andy Green 9c2a7dd58b ah pool: change to dynamic linked list
For some targets like ESP32, the ah pool is mainly sitting idle wasting memory.

For HTTP/2, if the client sends a series of pipelined headers on different SIDs
that exist simultaneously, there is no way to stall the headers to wait for an
ah, because we must read the stream for stuff like WINDOW_UPDATE on the other
streams.

In both these cases having the ability to free unused ah completely and allocate
more dynamically if there is memory is useful, so this patch makes the ah pool
an initially-empty linked list that allocates on demand up to the "max pool
size" limit from the context info.  When nobody wants an ah, it is freed (if
someone was waiting for it, it is directly reused).

For ESP32 it means no large, permanent alloc when lws starts and dynamic alloc
according to how many streams the client opens, which can be controlled by
SETTINGS.
2017-10-16 17:13:49 +08:00
..
etc-logrotate.d-lwsws logs document logrotate configuration for lwsws 2016-04-26 19:07:17 +08:00
etc-lwsws-conf-EXAMPLE ws ping pong on idle connections 2016-08-10 21:20:23 +08:00
etc-lwsws-conf.d-localhost-EXAMPLE lws-meta 2017-07-19 08:59:42 +08:00
main.c ah pool: change to dynamic linked list 2017-10-16 17:13:49 +08:00
usr-lib-systemd-system-lwsws.service context deprecation 2016-12-20 14:37:07 +08:00