echo >>>>[Aa:Bbb ] echo >>>>[:print:quotelist ] ===================== Linked List of Quotations ===================== Index Next Previous Author Quote Author Quote 0 -1 -1 0 3 [ Aa] [ Bbb] echo >>>>[:print:heaplist ] =========================== Heap Structure ========================== Index Next Garbage Size 0 -1 7 195993 echo >>>>[:print:data:6 ] ============================ heap.data[] ============================ Aa_Bbb_ echo >>>>[Cccc:Dddd ] echo >>>>[:print:quotelist ] ===================== Linked List of Quotations ===================== Index Next Previous Author Quote Author Quote 0 1 -1 0 3 [ Aa] [ Bbb] 1 -1 0 7 12 [ Cccc] [ Dddd] echo >>>>[:print:heaplist ] =========================== Heap Structure ========================== Index Next Garbage Size 0 -1 17 195983 echo >>>>[:print:data:16 ] ============================ heap.data[] ============================ Aa_Bbb_Cccc_Dddd_ echo >>>>[H:I ] echo >>>>[:print:quotelist ] ===================== Linked List of Quotations ===================== Index Next Previous Author Quote Author Quote 0 1 -1 0 3 [ Aa] [ Bbb] 1 2 0 7 12 [ Cccc] [ Dddd] 2 -1 1 17 19 [ H] [ I] echo >>>>[:print:heaplist ] =========================== Heap Structure ========================== Index Next Garbage Size 0 -1 21 195979 echo >>>>[:print:data:20 ] ============================ heap.data[] ============================ Aa_Bbb_Cccc_Dddd_H_I_ echo >>>>[Ffffff:Gggggg ] echo >>>>[:print:quotelist ] ===================== Linked List of Quotations ===================== Index Next Previous Author Quote Author Quote 0 1 -1 0 3 [ Aa] [ Bbb] 1 3 0 7 12 [ Cccc] [ Dddd] 3 2 1 21 28 [ Ffffff] [ Gggggg] 2 -1 3 17 19 [ H] [ I] echo >>>>[:print:heaplist ] =========================== Heap Structure ========================== Index Next Garbage Size 0 -1 35 195965 echo >>>>[:print:data:34 ] ============================ heap.data[] ============================ Aa_Bbb_Cccc_Dddd_H_I_Ffffff_Gggggg_ echo >>>>[:remove:2 //removes Cccc:Dddd. Not adjacent to a heap block ] echo >>>>[:print:quotelist ] ===================== Linked List of Quotations ===================== Index Next Previous Author Quote Author Quote 0 3 -1 0 3 [ Aa] [ Bbb] 3 2 0 21 28 [ Ffffff] [ Gggggg] 2 -1 3 17 19 [ H] [ I] echo >>>>[:print:heaplist ] =========================== Heap Structure ========================== Index Next Garbage Size 1 0 7 10 0 -1 35 195965 echo >>>>[:print:data:34 //The Cccc:Dddd in the heap but not erased. ] ============================ heap.data[] ============================ Aa_Bbb_Cccc_Dddd_H_I_Ffffff_Gggggg_ echo >>>>[too:bigforthehole ] echo >>>>[:print:quotelist ] ===================== Linked List of Quotations ===================== Index Next Previous Author Quote Author Quote 0 3 -1 0 3 [ Aa] [ Bbb] 3 2 0 21 28 [ Ffffff] [ Gggggg] 2 1 3 17 19 [ H] [ I] 1 -1 2 35 39 [ too] [bigfortheh] echo >>>>[:print:heaplist ] =========================== Heap Structure ========================== Index Next Garbage Size 1 0 7 10 0 -1 53 195947 echo >>>>[:print:data:52 ] ============================ heap.data[] ============================ Aa_Bbb_Cccc_Dddd_H_I_Ffffff_Gggggg_too_bigforthehole_ echo >>>>[I:fit ] echo >>>>[:print:quotelist ] ===================== Linked List of Quotations ===================== Index Next Previous Author Quote Author Quote 0 3 -1 0 3 [ Aa] [ Bbb] 3 2 0 21 28 [ Ffffff] [ Gggggg] 2 4 3 17 19 [ H] [ I] 4 1 2 7 9 [ I] [ fit] 1 -1 4 35 39 [ too] [bigfortheh] echo >>>>[:print:heaplist ] =========================== Heap Structure ========================== Index Next Garbage Size 1 0 13 4 0 -1 53 195947 echo >>>>[:print:data:52 ] ============================ heap.data[] ============================ Aa_Bbb_I_fit_ddd_H_I_Ffffff_Gggggg_too_bigforthehole_ echo >>>>[:remove:1 //removing Aa:Bbb cannot merge with the hole. ] echo >>>>[:print:quotelist ] ===================== Linked List of Quotations ===================== Index Next Previous Author Quote Author Quote 3 2 -1 21 28 [ Ffffff] [ Gggggg] 2 4 3 17 19 [ H] [ I] 4 1 2 7 9 [ I] [ fit] 1 -1 4 35 39 [ too] [bigfortheh] echo >>>>[:print:heaplist ] =========================== Heap Structure ========================== Index Next Garbage Size 1 2 13 4 2 0 0 7 0 -1 53 195947 echo >>>>[:print:data:52 ] ============================ heap.data[] ============================ Aa_Bbb_I_fit_ddd_H_I_Ffffff_Gggggg_too_bigforthehole_ echo >>>>[:remove:3 //removing I:fit should merge two blocks. ] echo >>>>[:print:quotelist ] ===================== Linked List of Quotations ===================== Index Next Previous Author Quote Author Quote 3 2 -1 21 28 [ Ffffff] [ Gggggg] 2 1 3 17 19 [ H] [ I] 1 -1 2 35 39 [ too] [bigfortheh] echo >>>>[:print:heaplist ] =========================== Heap Structure ========================== Index Next Garbage Size 2 0 0 17 0 -1 53 195947 echo >>>>[:print:data:52] ============================ heap.data[] ============================ Aa_Bbb_I_fit_ddd_H_I_Ffffff_Gggggg_too_bigforthehole_