推 Schottky: 是 stack 吧 09/14 04:10
推 b0920075: 首先你要先確定你的程式真的有複製 lib function 和你 09/14 06:10
→ b0920075: 所謂的靜態 buffer ,一般來說這兩個東西應該是 thread 09/14 06:10
→ b0920075: 會共享的,不會你開一個 thread 就複製一份 09/14 06:10
推 b0920075: 再來, thread 有各自的 stack ,而 stack 一般來說一 09/14 06:16
→ b0920075: 次就會分配很多空間省的你一直跟系統要,所以記憶體越 09/14 06:16
→ b0920075: 吃越多很正常 09/14 06:16
推 wulouise: 靜態buffer是static char*[]?這怎會跟thread一起長大... 09/14 22:08
→ wulouise: 你所謂的開到第十個thread爆增,是fork還是std::thread? 09/14 22:09
→ kingofsdtw: char buffer[1024] 沒mutex 09/15 00:33
→ kingofsdtw: 我在研究看看...記憶體爆了 09/15 00:34
→ kingofsdtw: 感謝大家 09/15 00:35
→ Lipraxde: 只有開到十個 thread 的時候會爆? 09/15 00:49
→ Schottky: 所以這沒加 static,你要確認一下是 global 還是 local 09/15 03:13
→ Schottky: local 不是靜態記憶體,它是存在 stack 的..... 09/15 03:13
推 enthos: radare2/pwndbg/GEF/peda/Pwngdb 看最後一個github圖 09/15 03:29
推 wulouise: 你把測試code貼出來才好討論吧,靜態長度要看放哪 09/15 19:02