Author: Remi Meier <[email protected]>
Branch: c8-private-pages
Changeset: r1559:e597e1e5cfe3
Date: 2015-01-20 16:38 +0100
http://bitbucket.org/pypy/stmgc/changeset/e597e1e5cfe3/
Log: fix a memory leak
diff --git a/c8/stm/nursery.c b/c8/stm/nursery.c
--- a/c8/stm/nursery.c
+++ b/c8/stm/nursery.c
@@ -250,7 +250,7 @@
in this segment) */
*((char *)(pseg->pub.segment_base + (((uintptr_t)obj) >> 4)))
= 0;
- /* XXX: _stm_large_free(stm_object_pages + item->addr); */
+ _stm_large_free(stm_object_pages + item->addr);
} TREE_LOOP_END;
}
@@ -332,13 +332,13 @@
object_t *_stm_allocate_external(ssize_t size_rounded_up)
{
- /* /\* first, force a collection if needed *\/ */
- /* if (is_major_collection_requested()) { */
- /* /\* use stm_collect() with level 0: if another thread does a major
GC */
- /* in-between, is_major_collection_requested() will become false */
- /* again, and we'll avoid doing yet another one afterwards. *\/ */
- /* stm_collect(0); */
- /* } */
+ /* first, force a collection if needed */
+ if (is_major_collection_requested()) {
+ /* use stm_collect() with level 0: if another thread does a major GC
+ in-between, is_major_collection_requested() will become false
+ again, and we'll avoid doing yet another one afterwards. */
+ stm_collect(0);
+ }
object_t *o = (object_t *)allocate_outside_nursery_large(size_rounded_up);
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit