Java process memory growing indefinitely. Memory leak?

前端 未结 2 1857
走了就别回头了
走了就别回头了 2021-02-04 11:13

We have a java process running on Solaris 10 serving about 200-300 concurrent users. The administrators have reported that memory used by process increases significantly over ti

2条回答
  •  醉梦人生
    2021-02-04 11:28

    In garbage collected environments, holding on to unused pointers amounts to "failure to leak" and prevents the GC from doing its job. It's really easy to accidentally keep pointers around.

    A common culprit is hashtables. Another is arrays or vectors which are logically cleared (by setting the reuse index to 0) but where the actual contents of the array (above the use index) is still pointing to something.

提交回复
热议问题