1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/lib
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
..
mbedtls_wrapper wrapper: force mbedtls ssl rx buf size to 2048 if 0 2017-10-16 17:13:49 +08:00
.gitignore Ignoring linux build files 2013-01-09 15:46:11 +08:00
alloc.c heap instrumentation 2017-10-16 17:13:49 +08:00
base64-decode.c base64 decode fix lengths 2016-08-10 21:20:23 +08:00
client-handshake.c heap instrumentation 2017-10-16 17:13:49 +08:00
client-parser.c clean 2017-09-27 08:24:05 +08:00
client.c heap instrumentation 2017-10-16 17:13:49 +08:00
context.c ah pool: change to dynamic linked list 2017-10-16 17:13:49 +08:00
daemonize.c context deprecation 2016-12-20 14:37:07 +08:00
extension-permessage-deflate.c heap instrumentation 2017-10-16 17:13:49 +08:00
extension-permessage-deflate.h extension permessage deflate 2016-01-11 11:34:01 +08:00
extension.c pmd: autobahn fixes 2017-07-28 13:12:03 +08:00
fops-zip.c heap instrumentation 2017-10-16 17:13:49 +08:00
getifaddrs.c heap instrumentation 2017-10-16 17:13:49 +08:00
getifaddrs.h esp8266 initial support 2016-08-10 21:20:23 +08:00
handshake.c CMake: convert all LWS_USE_... to LWS_WITH_... 2017-10-16 17:13:48 +08:00
header.c add 100 Continue 2017-10-16 17:13:49 +08:00
hpack.c ah pool: change to dynamic linked list 2017-10-16 17:13:49 +08:00
http2.c lws_intptr_t 2017-07-07 08:32:04 +08:00
huftable.h http2 hpack basic decode ok including huff 2014-10-12 08:38:16 +08:00
lejp-conf.c CMake: convert all LWS_USE_... to LWS_WITH_... 2017-10-16 17:13:48 +08:00
lejp.c documentation convert to doxygen 2016-07-14 08:57:27 +08:00
lejp.h documentation convert to doxygen 2016-07-14 08:57:27 +08:00
lextable-strings.h raw: adoption and processing 2017-02-21 07:47:35 +08:00
lextable.h raw: adoption and processing 2017-02-21 07:47:35 +08:00
libev.c clean 2017-09-27 08:24:05 +08:00
libevent.c clean 2017-09-27 08:24:05 +08:00
libuv.c heap instrumentation 2017-10-16 17:13:49 +08:00
libwebsockets.c ah pool: change to dynamic linked list 2017-10-16 17:13:49 +08:00
libwebsockets.h heap instrumentation 2017-10-16 17:13:49 +08:00
lws-genhash.c CMake: convert all LWS_USE_... to LWS_WITH_... 2017-10-16 17:13:48 +08:00
lws-plat-esp32.c heap instrumentation 2017-10-16 17:13:49 +08:00
lws-plat-esp8266.c heap instrumentation 2017-10-16 17:13:49 +08:00
lws-plat-optee.c heap instrumentation 2017-10-16 17:13:49 +08:00
lws-plat-unix.c heap instrumentation 2017-10-16 17:13:49 +08:00
lws-plat-win.c heap instrumentation 2017-10-16 17:13:49 +08:00
minihuf.c whitespace trailing mass cleanout 2015-12-14 08:52:03 +08:00
minilex.c whitespace trailing mass cleanout 2015-12-14 08:52:03 +08:00
output.c heap instrumentation 2017-10-16 17:13:49 +08:00
parsers.c ah pool: change to dynamic linked list 2017-10-16 17:13:49 +08:00
pollfd.c CMake: convert all LWS_USE_... to LWS_WITH_... 2017-10-16 17:13:48 +08:00
private-libwebsockets.h ah pool: change to dynamic linked list 2017-10-16 17:13:49 +08:00
ranges.c clean 2017-09-27 08:24:05 +08:00
rewrite.c heap instrumentation 2017-10-16 17:13:49 +08:00
romfs.c esp32: ROMFS use checksum as mtime so ETAG caching works 2017-04-05 10:44:28 +08:00
romfs.h esp32: ROMFS use checksum as mtime so ETAG caching works 2017-04-05 10:44:28 +08:00
server-handshake.c LWS_CALLBACK_ADD_HEADERS: also on upgrade headers 2017-09-27 08:24:04 +08:00
server.c heap instrumentation 2017-10-16 17:13:49 +08:00
service.c ah pool: change to dynamic linked list 2017-10-16 17:13:49 +08:00
sha-1.c polarssl implementation 2016-04-18 20:05:43 +08:00
smtp.c heap instrumentation 2017-10-16 17:13:49 +08:00
ssl-client.c CMake: convert all LWS_USE_... to LWS_WITH_... 2017-10-16 17:13:48 +08:00
ssl-http2.c ah pool: change to dynamic linked list 2017-10-16 17:13:49 +08:00
ssl-server.c ah pool: change to dynamic linked list 2017-10-16 17:13:49 +08:00
ssl.c heap instrumentation 2017-10-16 17:13:49 +08:00