JDK-6383439 : ByteBuffer leaves a huge C-heap footprint on Solaris AMD in server mode
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 5.0u6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_10
  • CPU: x86
  • Submitted: 2006-02-09
  • Updated: 2010-07-29
  • Resolved: 2006-02-21
Related Reports
Duplicate :  
Description
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 );
                }
        }
}
******************************************************************