Java 出现内存分配失败

问题

If you see that the storm process is getting crashed even though you have enough memory (swap/free) available then you should also check the “/proc/sys/vm/overcommit_memory

  • This switch knows 3 different settings:

=> 0: The Linux kernel is free to over commit memory(this is the default), a heuristic algorithm is applied to figure out if enough memory is available.

  1. ArrayList
  2. LinkedList
  3. HashMap
  4. LinkedHashMap
  5. TreeMap
  6. ThreadLocal
  7. ThreadPoolExecutor
  8. CopyOnWriteArrayList
  9. ConcurrentHashMap
  10. ConcurrentSkipListMap
  11. ArrayBlockingQueue
  12. LinkedBlockingQueue
  13. PriorityQueue
  14. AtomicInteger
  15. AQS (AbstractQueuedSynchronizer)
  16. CountDownLatch
  17. Semaphore
  18. CyclicBarrier
  19. ReentrantLock
  20. ReentrantReadWriteLock