[Openmcl-cvs-notifications] r13895 - /trunk/source/lisp-kernel/pmcl-kernel.c
gb at clozure.com
gb at clozure.com
Mon Jun 28 07:33:32 UTC 2010
Author: gb
Date: Mon Jun 28 01:33:31 2010
New Revision: 13895
Log:
Conditionalize for USE_GC_NOTIFICATATION (true on X86, not yet on PPC).
Modified:
trunk/source/lisp-kernel/pmcl-kernel.c
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 Jun 28 01:33:31 2010
@@ -2284,23 +2284,35 @@
lisp_global(STATIC_CONSES)=3Dprev;
lisp_global(FREE_STATIC_CONSES)+=3D(n<<fixnumshift);
}
+
+#ifdef X86
+#define USE_GC_NOTIFICATION 1
+#else
+#undef USE_GC_NOTIFICATION
+#endif
+
void
ensure_static_conses(ExceptionInformation *xp, TCR *tcr, natural nconses)
{
area *a =3D active_dynamic_area;
natural nbytes =3D nconses>>dnode_shift, have;
BytePtr p =3D a->high-nbytes;
+#ifdef USE_GC_NOTIFICATION
Boolean crossed_notify_threshold =3D false;
LispObj before_shrink, after_shrink;
+#endif
=
if (p < a->active) {
untenure_from_area(tenured_area);
gc_from_xp(xp, 0L);
+#ifdef USE_GC_NOTIFICATION
did_gc_notification_since_last_full_gc =3D false;
+#endif
}
=
have =3D unbox_fixnum(lisp_global(FREE_STATIC_CONSES));
if (have < nconses) {
+#ifdef USE_GC_NOTIFICATION
before_shrink =3D a->high-a->active;
if (before_shrink>nbytes) {
shrink_dynamic_area(nbytes);
@@ -2310,11 +2322,14 @@
crossed_notify_threshold =3D true;
}
}
+#endif
allocate_static_conses(nconses);
tcr->bytes_allocated +=3D nbytes;
}
+#ifdef USE_GC_NOTIFICATION
if (crossed_notify_threshold && !did_gc_notification_since_last_full_gc)=
{
callback_for_gc_notification(xp,tcr);
}
+#endif
}
=
More information about the Openmcl-cvs-notifications
mailing list