Is there a way to programmatically (without using profilers, etc.) determine how much memory a heap consumes a single thread? Or is there a way to set a limit on the memory consumed by the stream?
(I think it might be possible in Java7, though)
source
share