Skip to content

Instantly share code, notes, and snippets.

@jj1bdx
Created June 2, 2014 03:58
Show Gist options
  • Save jj1bdx/313c881a1e12ecfb7157 to your computer and use it in GitHub Desktop.
Save jj1bdx/313c881a1e12ecfb7157 to your computer and use it in GitHub Desktop.
Get stacksize for each pthread
#include <pthread.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
size_t stacksize;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_getstacksize (&attr, &stacksize);
printf("Default stack size = %zu\n", stacksize);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment