private void testDump(StringBuilder result) {
      result.append("{");
      if (data == null) {
        result.append("}, ");
        return;
      }
      // Try to get as consistent view as we can; make copy of the headers.
      byte[] headers = new byte[this.headers.length];
      System.arraycopy(this.headers, 0, headers, 0, headers.length);
      for (int i = 0; i < headers.length; ++i) {
        byte header = headers[i];
        if (header == 0) continue;
        String allocState = ".";
        if (buffers[i] != null) {
          allocState = "*"; // Allocated
        } else if ((header & 1) == 1) {
          allocState = "!"; // Locked for defrag
        }
        int size = 1 << (freeListFromHeader(header) + minAllocLog2);
        result.append("[").append(size).append(allocState).append("@").append(i).append("]");
      }
      result.append("}, ");
    }
Unsets the headers (meaning this does not refer to a buffer).
llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java