Trying to locate a leak! What does anon mean for pmap?

前端 未结 4 1927
孤独总比滥情好
孤独总比滥情好 2020-12-08 00:44

I\'m trying to locate where my memory has gone for a java process running in linux. Someone suggested I use pmap -x to see exactly what the memory is doing.

The out

4条回答
  •  广开言路
    2020-12-08 01:21

    I've seen that pattern before in a thread leak. If you have code that is trying to pool threads, but somehow messes up and leaks a thread, you get a pattern like that in pmap.

    I think each bit of memory is the minimum stack size for the thread, certainly it had nothing to do with heap in our case.
    We still got OutOfMemoryErrors when we hit OS limits, even tho when we analise the heap it is not overallocated.

    When we had a problem like this pmap [pid] | grep -c 12K turned out to be the number of threads in use.

提交回复
热议问题