public int getInMemorySize() {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getInMemorySize");

    // The fluffed size needs to be calculated if it hasn't already been set.
    if (fluffedSize == -1) {
      fluffedSize = guessFluffedSize();
    }

    // Add together the values for the approximate encoded length & the fluffed size.
    // Use getApproximateLength() for the encoded length, so that we pick up any cached value.
    int inMemorySize = getApproximateLength() + fluffedSize;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getInMemorySize", inMemorySize);
    return inMemorySize;
  }
public int getInMemorySize ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getInMemorySize" ) ; if ( fluffedSize == - 1 ) { fluffedSize = guessFluffedSize ( ) ; } int inMemorySize = getApproximateLength ( ) + fluffedSize ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getInMemorySize" , inMemorySize ) ; return inMemorySize ; }
Get the approximate size of the message in memory.
This will be a will be a quick and inexpensive (but potentially very
inaccurate) calculation of the amount of space occupied in the heap by
a message which is both fully-fluffy and flattened (i.e. worst case).
Being both fluffy and flattened is also a description of a badger when it
meets a lorry. (GW)

Javadoc description supplied by JsMessage interface.