[pypy-svn] r77401 - in pypy/branch/smaller-writebarrier/pypy: rlib rpython/memory/gc/test
arigo at codespeak.net
arigo at codespeak.net
Mon Sep 27 13:08:17 CEST 2010
Author: arigo
Date: Mon Sep 27 13:08:16 2010
New Revision: 77401
Modified:
pypy/branch/smaller-writebarrier/pypy/rlib/rstring.py
pypy/branch/smaller-writebarrier/pypy/rpython/memory/gc/test/test_minimark.py
Log:
Kill this test which does not make sense any more.
Restore the default of 100 in rstring.py.
Modified: pypy/branch/smaller-writebarrier/pypy/rlib/rstring.py
==============================================================================
--- pypy/branch/smaller-writebarrier/pypy/rlib/rstring.py (original)
+++ pypy/branch/smaller-writebarrier/pypy/rlib/rstring.py Mon Sep 27 13:08:16 2010
@@ -46,9 +46,7 @@
# -------------- public API ---------------------------------
-# the following number is the maximum size of an RPython unicode
-# string that goes into the nursery of the minimark GC.
-INIT_SIZE = 56
+INIT_SIZE = 100 # XXX tweak
class AbstractStringBuilder(object):
def __init__(self, init_size=INIT_SIZE):
Modified: pypy/branch/smaller-writebarrier/pypy/rpython/memory/gc/test/test_minimark.py
==============================================================================
--- pypy/branch/smaller-writebarrier/pypy/rpython/memory/gc/test/test_minimark.py (original)
+++ pypy/branch/smaller-writebarrier/pypy/rpython/memory/gc/test/test_minimark.py Mon Sep 27 13:08:16 2010
@@ -5,26 +5,6 @@
# Note that most tests are in test_direct.py.
-def test_stringbuilder_default_initsize_is_small():
- # Check that pypy.rlib.rstring.INIT_SIZE is short enough to let
- # the allocated object be considered as a "small" object.
- # Otherwise it would not be allocated in the nursery at all,
- # which is kind of bad (and also prevents shrink_array() from
- # being useful).
- from pypy.rlib.rstring import INIT_SIZE
- from pypy.rpython.lltypesystem.rstr import STR, UNICODE
- #
- size_gc_header = llmemory.raw_malloc_usage(
- llmemory.sizeof(llmemory.Address))
- #
- size1 = llmemory.raw_malloc_usage(llmemory.sizeof(STR, INIT_SIZE))
- size1 = size_gc_header + size1
- assert size1 <= MiniMarkGC.TRANSLATION_PARAMS["small_request_threshold"]
- #
- size2 = llmemory.raw_malloc_usage(llmemory.sizeof(UNICODE, INIT_SIZE))
- size2 = size_gc_header + size2
- assert size2 <= MiniMarkGC.TRANSLATION_PARAMS["small_request_threshold"]
-
def test_card_marking_words_for_length():
gc = MiniMarkGC(None, card_page_indices=128)
assert gc.card_page_shift == 7
More information about the Pypy-commit
mailing list