Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6383439

ByteBuffer leaves a huge C-heap footprint on Solaris AMD in server mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 5.0u6
    • hotspot
    • None
    • gc
    • x86
    • solaris_10

      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 );
                      }
              }
      }
      ******************************************************************

            Unassigned Unassigned
            tviessma Thomas Viessmann (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: