maybe i'm reading it wrong, but if your goal is to round up to the next page, wouldn't you want to add __static_tls_size to size and then do the round up ?
size = roundup(size + __static_tls_size, __getpagesize());
maybe i'm reading it wrong, but if your goal is to round up to the next page, wouldn't you want to add __static_tls_size to size and then do the round up ?
size = roundup(size + __static_tls_size, __getpagesize());