[Python-Dev] intobject.c free_list and int_dealloc() (original) (raw)
Laurent Luce laurentluce49 at yahoo.com
Sun Oct 6 23:43:17 CEST 2013
- Previous message: [Python-Dev] Reduce memory footprint of Python
- Next message: [Python-Dev] [Python-checkins] cpython (3.3): PythonCAD is now on PyQt, use Wing as a prominent PyGtk example.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20131006/a74ff82c/attachment.html>
- Previous message: [Python-Dev] Reduce memory footprint of Python
- Next message: [Python-Dev] [Python-checkins] cpython (3.3): PythonCAD is now on PyQt, use Wing as a prominent PyGtk example.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]