mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
![]() Large chunks of struct libwebsocket members actually have a mutually exclusive lifecycle, eg, once the http headers are finished they sit there unused until the instance is destroyed. This makes a big improvement in memory efficiency by making four categories of member: always needed, needed for header processing, needed for http processing, and needed for ws processing. The last three are mutually exclusive and bound into a union inside the wsi. Care needs taking now at "union transitions", although we zeroed down the struct at init, the other union siblings have been writing the same memory by the time later member siblings start to use it. So it must be cleared down appropriately when we cross from one mutually-exclusive use to another. Signed-off-by: Andy Green <andy.green@linaro.org> |
||
---|---|---|
.. | ||
.gitignore | ||
base64-decode.c | ||
client-handshake.c | ||
client-parser.c | ||
client.c | ||
daemonize.c | ||
extension-deflate-frame.c | ||
extension-deflate-frame.h | ||
extension-deflate-stream.c | ||
extension-deflate-stream.h | ||
extension.c | ||
getifaddrs.c | ||
getifaddrs.h | ||
handshake.c | ||
libwebsockets.c | ||
libwebsockets.h | ||
Makefile.am | ||
minilex.c | ||
output.c | ||
parsers.c | ||
private-libwebsockets.h | ||
server-handshake.c | ||
server.c | ||
sha-1.c |