[Openmcl-cvs-notifications] r13954 - in /trunk/source/lisp-kernel: gc-common.c pmcl-kernel.c
gb at clozure.com
gb at clozure.com
Mon Jul 12 07:10:49 CDT 2010
Author: gb
Date: Mon Jul 12 07:10:49 2010
New Revision: 13954
Log:
In commit_pages(), try to ensure that we return false if CommitMemory() doe=
s.
In gc(), zero_pages() after possibly shrinking heap.
Modified:
trunk/source/lisp-kernel/gc-common.c
trunk/source/lisp-kernel/pmcl-kernel.c
Modified: trunk/source/lisp-kernel/gc-common.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/gc-common.c (original)
+++ trunk/source/lisp-kernel/gc-common.c Mon Jul 12 07:10:49 2010
@@ -1364,7 +1364,7 @@
LispObj
pkg =3D 0,
itabvec =3D 0;
- BytePtr oldfree =3D a->active;
+ BytePtr oldfree =3D a->active, last_zeroed_addr;
TCR *other_tcr;
natural static_dnodes;
natural weak_method =3D lisp_global(WEAK_GC_METHOD) >> fixnumshift;
@@ -1677,10 +1677,16 @@
tenure_to_area(to);
}
=
- zero_memory_range(a->active, oldfree);
=
resize_dynamic_heap(a->active,
(GCephemeral_low =3D=3D 0) ? lisp_heap_gc_threshol=
d : 0);
+
+ if (oldfree < a->high) {
+ last_zeroed_addr =3D oldfree;
+ } else {
+ last_zeroed_addr =3D a->high;
+ }
+ zero_memory_range(a->active, last_zeroed_addr);
=
/*
If the EGC is enabled: If there's no room for the youngest
Modified: trunk/source/lisp-kernel/pmcl-kernel.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/pmcl-kernel.c (original)
+++ trunk/source/lisp-kernel/pmcl-kernel.c Mon Jul 12 07:10:49 2010
@@ -447,10 +447,11 @@
commit_pages(void *start, size_t len)
{
if (len !=3D 0) {
- if (CommitMemory(start, len)) {
- if (touch_all_pages(start, len)) {
- return true;
- }
+ if (!CommitMemory(start, len)) {
+ return false;
+ }
+ if (!touch_all_pages(start, len)) {
+ return false;
}
}
return true;
More information about the Openmcl-cvs-notifications
mailing list