Skip to content

Spending a lot of time inside __pthread_create calling memset #19110

Answered by kripken
svenpilz asked this question in Q&A
Discussion options

You must be logged in to vote

pthread_create will memset to 0 the memory the thread needs, which includes the stack and TLS. Your stack size is 5MB, so reducing that could help significantly. Hopefully you don't need that much? The default is 64K these days, which is enough for most applications.

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@sbc100
Comment options

Answer selected by svenpilz
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@sbc100
Comment options

@svenpilz
Comment options

@sbc100
Comment options

@svenpilz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants