code: public int getMapMemoryUsedInWords()
      {
          int headerSize = 2;
          int sizeInWords = this.table.length + headerSize;
          for (int i = 0; i < this.table.length; i += 2)
          {
              if (this.table[i] == CHAINED_KEY)
              {
                  sizeInWords += headerSize + ((Object[]) this.table[i + 1]).length;
              }
          }
          return sizeInWords;
      }
docs: Returns the number of JVM words that is used by this map.  A word is 4 bytes in a 32bit VM and 8 bytes in a 64bit
  VM. Each array has a 2 word header, thus the formula is:
  words = (internal table length + 2) + sum (for all chains (chain length + 2))
  
  @return the number of JVM words that is used by this map.