title: Unit of size returned by java instrumentation
body: <p>I am using the following java project to determine size of object
  <a href="http://sizeof.sourceforge.net/" rel="nofollow">http://sizeof.sourceforge.net/</a></p>
  
  <pre><code>public class DataClass /*implements Serializable*/{
  
      // private static final long serialVersionUID = 5199373516861766638L;
      String name = "GUNJ";
      String lastName= "";
  
      // int age = 148888890;
  
      @Override
      public String toString() {
          return "DataClass{" +
                  "Name='" + name + '\'' +
                  ", Last Name='" + lastName + '\'' +
                  ", Age=" +
                  '}';
  
      }
  
      public static void main(String[] args) {
  
          // SizeOf.skipStaticField(true);
          // SizeOf.skipFinalField(true);
          // SizeOf.skipFlyweightObject(true);
  
          System.out.println(SizeOf.humanReadable(SizeOf.deepSizeOf(new DataClass()))); //this will print the object size in bytes
      }
  
  }
  </code></pre>
  
  <p>I get results as below
  144Kb, 64Kb, 72Kb</p>
  
  <ol>
  <li>Does 'b' here represent bits or bytes?</li>
  <li>Why does the output not change as I change the number of characters in the above case? Sometimes it increases while sometimes it does not.</li>
  </ol>
  
  <p>It seems to be using Java instrumentation code</p>
  
  <p>Seems to be using the following package: java.lang.instrument.Instrumentation</p>
  
  <p>But not sure whether the APIs of the package returns object size in bits or bytes.</p>