Author: Armin Rigo <[email protected]>
Branch: array-overallocation-in-nursery
Changeset: r67515:02dac9fc5132
Date: 2013-10-22 15:15 +0200
http://bitbucket.org/pypy/pypy/changeset/02dac9fc5132/
Log: Start by adjusting the comment
diff --git a/rpython/rtyper/lltypesystem/rlist.py
b/rpython/rtyper/lltypesystem/rlist.py
--- a/rpython/rtyper/lltypesystem/rlist.py
+++ b/rpython/rtyper/lltypesystem/rlist.py
@@ -13,20 +13,15 @@
# ____________________________________________________________
#
-# Concrete implementation of RPython lists:
+# The concrete implementation of resized RPython lists is as a GcStruct
+# with only one field: a pointer to an overallocated array of items.
+# This overallocated array is a C-like array in memory preceded by
+# three fields: the GC header, 'allocated_length', and 'used_length'.
+# In the array part, each item contains a primitive value or pointer
+# to the actual list item.
#
-# struct list {
-# int length;
-# items_array *items;
-# }
-#
-# 'items' points to a C-like array in memory preceded by a 'length' header,
-# where each item contains a primitive value or pointer to the actual list
-# item.
-#
-# or for fixed-size lists an array is directly used:
-#
-# item_t list_items[]
+# For fixed-size lists, we just use a GcArray, which has only one
+# 'length' after the GC header.
#
class BaseListRepr(AbstractBaseListRepr):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit