From: Guus Sliepen Date: Mon, 12 Jul 2021 19:52:08 +0000 (+0200) Subject: Reduce the stack size of the background thread. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=fd437cb61fefdc4abf44813a171c9cf18df695b3;p=meshlink-tiny Reduce the stack size of the background thread. --- diff --git a/src/meshlink.c b/src/meshlink.c index aadbaf3..7c37c7b 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -1161,7 +1161,7 @@ bool meshlink_start(meshlink_handle_t *mesh) { // Ensure we have a decent amount of stack space. Musl's default of 80 kB is too small. pthread_attr_t attr; pthread_attr_init(&attr); - pthread_attr_setstacksize(&attr, 1024 * 1024); + pthread_attr_setstacksize(&attr, 16 * 1024); if(pthread_create(&mesh->thread, &attr, meshlink_main_loop, mesh) != 0) { logger(mesh, MESHLINK_ERROR, "Could not start thread: %s\n", strerror(errno));