3 ms·
Me too, I really hate that! I wish they'd stop making that very obvious and simple mistake in reasoning! ...just so that _I_ can know that you know what you're
by scubbo 6y ago
Me too, I really hate that! I wish they'd stop making that very obvious and simple mistake in reasoning!
...just so that _I_ can know that you know what you're talking about, can you elaborate on what that obvious mistake (which I clearly know about) is?
Dropping the joke - I assume it's that threads share memory in some way (so that the total consumed is not the sum of each consumption), but a. how and why, and b. why isn't it trivial for htop to represent that "correctly"?
- garaetjjte 6y agoThreads usually share address space. There's no way to know particular thread memory usage, so htop just duplicates same information for every thread.
- scubbo 6y agoGot it, thanks. > There's no way to know particular thread memory usage This sounds like the sort of statement that is self-evident to folks with a CS education (I studied math, and all my CS/programming knowledge is self-taught). I'll add that to my _long_ backlog of things that I should research to get over my imposter syndrome :)
- SAI_Peregrinus 6y agoFor most operating systems, threads each have their own stack space, and (if supported) thread-local storage, but share heap, constants (.bss), and static variables (.data). It's impossible to say exactly what resources a given thread is using from those shared resources, so htop just includes them all, for every thread.
- scubbo 6y agoMuch appreciated, thank you!