From f27034201fa468f5d56c50f14a58124ebdbfb2f1 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Fri, 8 Feb 2013 12:53:27 +0800 Subject: [PATCH] account for context in static allocation figure Signed-off-by: Andy Green --- lib/libwebsockets.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c index 131e5e72..dc21b6b7 100644 --- a/lib/libwebsockets.c +++ b/lib/libwebsockets.c @@ -1592,6 +1592,7 @@ libwebsocket_create_context(int port, const char *interf, context->max_fds = getdtablesize(); lwsl_notice(" max fd tracked: %u\n", context->max_fds); lwsl_notice(" static allocation: %u bytes\n", + sizeof(struct libwebsocket_context) + (sizeof(struct pollfd) * context->max_fds) + (sizeof(struct libwebsocket *) * context->max_fds));