pub fn draw_free(&self) {
        print!("|");
        let mut old = 0;
        let mut unused = 0;
        for (key, value) in self.free.ranges.iter() {
            print!("{}", "_".repeat(key.to_usize() - old));
            print!("{}", "X".repeat(*value));
            unused += value;
            old = key.to_usize();
        }
        print!("{}", "_".repeat(self.free.capacity - old));
        println!("|");

        println!("==== INFO ====");
        println!("heap size:       {} bytes", self.data.len() * 8);
        println!("total slots:     {} slots", self.data.len());
        println!("disjoint ranges: {} slots", self.free.ranges.len());
        let pct = (unused as f64 / self.free.capacity as f64) * 100.0;
        println!(
            "fragmentation:   {} / {} = {:.2}%",
            unused, self.free.capacity, pct
        );
    }
Dumps a representation of the heap to stdout.
Useful for general debugging.
passerine-qualm/src/heap/mod.rs