Get thread stack size at runtime