Hello,

I am trying to understand how the free list linked-list evolves when an int 
object is deallocated.

At the beginning, free_list is pointing to the last int object (n-1) in the 
block.  We initialize two int objects, free_list now points to the int object: 
n-3.

free_list -> n-3
n-1 -> n-2
n-2 -> n-3
n-3 -> n-4...


We delete the first int object initialized:


n-1 -> n-3
free_list -> n-1

It seems to me that two elements are now pointing to the n-3 element: n-1 and 
n-2.  I am pretty sure I am missing something here.  Can someone let me know?


Thanks,


Laurent
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to