0

When Python expands/reallocates the space of a list, it seems that the start position of the list in the memory is not changed. If directly reallocate/reclaim more memory space directly after the original list space, I think that it is possible that the newly allocated/claimed memory space runs into the memory space used by some other variables. How does Python avoid this or what is the mechanism of Python to organize the memory usage, e.g., for List?

0 Answers0