+lispobj *
+pa_alloc(int bytes)
+{
+ lispobj *result=0;
+ SetSymbolValue(PSEUDO_ATOMIC_INTERRUPTED, make_fixnum(0));
+ SetSymbolValue(PSEUDO_ATOMIC_ATOMIC, make_fixnum(1));
+ result=alloc(bytes);
+ SetSymbolValue(PSEUDO_ATOMIC_ATOMIC, make_fixnum(0));
+ if (SymbolValue(PSEUDO_ATOMIC_INTERRUPTED))
+ /* even if we gc at this point, the new allocation will be
+ * protected from being moved, because result is on the c stack
+ * and points to it */
+ do_pending_interrupt();
+ return result;
+}
+