The reason I ask is because it is possible to operate on memory views in Cython without the GIL, and without somehow marking them to not be moved. For example:
def f(double[:] z):
cdef int i, n = len(z)
with nogil:
for i in prange(n):
z[i] += 1.5
This is unlike what happens in, for example, Java, where you have to get and release arrays in order to prevent them from being moved by the GC while you are using them in external code. So, either there is some marking or get/release thing going on behind the scenes, or else the Python garbage collector never moves arrays, which would seem to imply that the garbage collector is non-copying.
First of all, am I right that it is non-copying? And is this a guaranteed, documented feature of the language, meaning that anything that wants to call itself a "python interpreter" must have a non-copying garbage collector?