Duplicate :
|
When running this small test program I get a huge C-heap footprint of > 1.5 GB on Solaris AMD. Only in -server mode. In -client mode or on Linux the C-heap is down to < 50m. The Java heap behaves normally in all cases. Just a few MB is being allocated. Check with pmap: 08070000 65488K rwx-- [ heap ] <- -client 08070000 1637480K rwx-- [ heap ] <- -server ****************************************************************** import java.nio.ByteBuffer; public class TestDirectBuffer { public static void main( String args[] ) throws Exception { for ( int i = 0; i < 1024*1024*5; i++ ) { ByteBuffer.allocateDirect( 128 ); } while ( true ) { Thread.currentThread().sleep( 500 ); } } } ******************************************************************