digraph {
  mem[label=<<table>
    <tr><td port="a0">0</td><td port="a1">4</td><td port="a2">8</td><td port="a3">12</td><td port="a4">16</td><td port="a5">20</td><td port="a6">24</td><td port="a7">28</td><td port="a8">32</td><td port="a9">36</td><td port="a10">40</td><td port="a11">44</td><td port="a12">48</td><td port="a13">52</td><td port="a14">56</td><td port="a15">60</td><td port="a16">64</td><td port="a17">68</td><td port="a18">72</td><td port="a19">76</td><td port="a20">80</td><td>...</td><td port="stack"><i>stack</i></td></tr>
  </table>>, shape=plaintext, xlabel="memory"]

  {
    rank=same

    free0[label=<<table>
      <tr><td port="in">next-free</td><td port="next">20</td></tr>
    </table>>, shape=plaintext, xlabel="free pointer"]

    free1[label=<<table>
      <tr><td port="in">next-free</td><td port="next">0</td></tr>
      <tr><td>size</td><td>52</td></tr>
      <tr><td colspan="2"><i>...</i></td></tr>
    </table>>, shape=plaintext, xlabel="free block"]

    null1[shape=point]
  }

  {
    rank=same

    object1[label=<<table>
      <tr><td port="in">ref. count</td><td>1</td></tr>
      <tr><td>size</td><td>8</td></tr>
      <tr><td colspan="2"><i>data</i></td></tr>
    </table>>, shape=plaintext, xlabel="object"]
  }

  brk->mem:a20
  sp->mem:stack
  
  mem:a0->free0:in
  mem:a1->object1:in
  mem:a5->free1:in

  free0:next->free1:in
  free1:next->null1

  free1->object1[style=invis]
}
