reorder the config functions. add comments for st to support 100k threads, use MALLOC_STACK macro.