extern unsigned long bytes_consed_between_gcs; /* gc-common.c */
unsigned long auto_gc_trigger = 0;
-size_t dynamic_space_size = DEFAULT_DYNAMIC_SPACE_SIZE;
-
/* the source and destination generations. These are set before a GC starts
* scavenging. */
generation_index_t from_space;
/* Compute the number of pages needed for the dynamic space.
* Dynamic space size should be aligned on page size. */
page_table_pages = dynamic_space_size/PAGE_BYTES;
- gc_assert(dynamic_space_size == page_table_pages*PAGE_BYTES);
+ gc_assert(dynamic_space_size == (size_t) page_table_pages*PAGE_BYTES);
page_table = calloc(page_table_pages, sizeof(struct page));
gc_assert(page_table);
#else
&boxed_region;
#endif
+#ifndef LISP_FEATURE_WIN32
+ lispobj alloc_signal;
+#endif
void *new_obj;
void *new_free_pointer;
+
gc_assert(nbytes>0);
/* Check for alignment allocation problems. */
}
}
new_obj = gc_alloc_with_region(nbytes,0,region,0);
+
+#ifndef LISP_FEATURE_WIN32
+ alloc_signal = SymbolValue(ALLOC_SIGNAL,thread);
+ if ((alloc_signal & FIXNUM_TAG_MASK) == 0) {
+ if ((signed long) alloc_signal <= 0) {
+#ifdef LISP_FEATURE_SB_THREAD
+ kill_thread_safely(thread->os_thread, SIGPROF);
+#else
+ raise(SIGPROF);
+#endif
+ } else {
+ SetSymbolValue(ALLOC_SIGNAL,
+ alloc_signal - (1 << N_FIXNUM_TAG_BITS),
+ thread);
+ }
+ }
+#endif
+
return (new_obj);
}
\f