3 ms·
By the way, on glibc/Linux, you need (main thread) stack space proportional to the complexity of your shared libraries (number of symbols). The ld.so memory man
by kazinator 9y ago
By the way, on glibc/Linux, you need (main thread) stack space proportional to the complexity of your shared libraries (number of symbols). The ld.so memory manager uses alloca for data structures related to symbol resolution.
- BeeOnRope 9y agoInteresting. I guess this memory is also used at somewhat unpredictable times in the usual case where symbols are resolved lazily though the PLT: when you first use a function you'll suddenly get this extra stack usage while ld.so does it's thing? Doesn't that also imply this caveat also applies to thread stacks if you end up resolving symbols off of the main thread?