code: private void checkFreeChunk(int p) {
      if (VALIDATING) {
        int sz = chunkSize(p);
        int next = p + sz;
        checkAnyChunk(p);
        if (isInUse(p))
          throw new AssertionError("Free chunk " + p + " is not marked as free");
        if (nextPreviousInUse(p))
          throw new AssertionError("Next chunk after " + p + " has it marked as in use");
        if (p != designatedVictim && p != top) {
          if (sz < MIN_CHUNK_SIZE) 
            throw new AssertionError("Free chunk " + p + " is too small");
          if ((sz & CHUNK_ALIGN_MASK) != 0)
            throw new AssertionError("Chunk size " + sz + " of " + p + " is not correctly aligned");
          if (!isAligned(chunkToMem(p)))
            throw new AssertionError("User pointer for chunk " + p + " is not correctly aligned");
          if (prevFoot(next) != sz)
            throw new AssertionError("Next chunk after " + p + " has an incorrect previous size");
          if (!previousInUse(p))
            throw new AssertionError("Chunk before free chunk " + p + " is free - should have been merged");
          if (next != top && !isInUse(next))
            throw new AssertionError("Chunk after free chunk " + p + " is free - should have been merged");        
          if (backward(forward(p)) != p)
            throw new AssertionError("Free chunk " + p + " has invalid chain links");
          if (forward(backward(p)) != p)
            throw new AssertionError("Free chunk " + p + " has invalid chain links");
        }
      }
    }
docs: /* Check properties of free chunks