diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:25 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:25 -0800 |
commit | db04688faa20f3576257c0fe41752ec435beab9a (patch) | |
tree | 6d638c2e1f65afd5f49d20b2d22ce35bd74705ff /setjump.h | |
parent | 1edcb9b62a1a520eddae8403c19d841c9b18737f (diff) | |
download | scm-db04688faa20f3576257c0fe41752ec435beab9a.tar.gz scm-db04688faa20f3576257c0fe41752ec435beab9a.zip |
Import Upstream version 5c3upstream/5c3
Diffstat (limited to 'setjump.h')
-rw-r--r-- | setjump.h | 35 |
1 files changed, 24 insertions, 11 deletions
@@ -74,7 +74,7 @@ is in init_storage() and alloc_some_heap() in sys.c If INIT_HEAP_SIZE can be allocated initially, the heap will grow by - EXPHEAP(heap_size) when more heap is needed. + EXPHEAP(heap_cells) when more heap is needed. MIN_HEAP_SEG_SIZE is minimum size of heap to accept when more heap is needed. @@ -93,21 +93,39 @@ # define HEAP_SEG_SIZE (8100L*sizeof(cell)) # endif #endif -#define EXPHEAP(heap_size) (heap_size*2) +#define EXPHEAP(heap_cells) (heap_cells*2) #define INIT_MALLOC_LIMIT 100000 +/* ECACHE_SIZE is the number of cells in the copy-collected environment + cache used for environment frames */ +#define ECACHE_SIZE 2000 + +/* If fewer than MIN_GC_YIELD cells are recovered during a + cell-requested garbage collection (GC), then another heap segment + is allocated. */ + +#define MIN_GC_YIELD (heap_cells / 4) + +/* If fewer than MIN_MALLOC_YIELD cells are free after a + malloc-requested garbage collection (GC), then the mtrigger limit + is raised. */ + +#define MIN_MALLOC_YIELD (mtrigger / 8) + +/* NUM_HASH_BUCKETS is the number of symbol hash table buckets. */ + +#define NUM_HASH_BUCKETS 137 + #ifdef IN_CONTINUE_C # include "scm.h" # define malloc(size) must_malloc((long)(size), s_cont) -# define free(obj) must_free((char *)(obj)) +# define free(obj) must_free((char *)(obj), 0) #endif /* other.dynenv and other.parent get GCed just by being there. */ struct scm_other {SCM dynenv; SCM parent; -#ifdef CAUTIOUS - SCM stack_trace; -#endif + SCM env; }; #define CONTINUATION_OTHER struct scm_other #define CONT(x) ((CONTINUATION *)CDR(x)) @@ -115,8 +133,3 @@ struct scm_other {SCM dynenv; void dowinds P((SCM to, long delta)); #include "continue.h" - -/* See scm.h for definition of P */ -void mark_locations P((STACKITEM x[], sizet n )); -void scm_dynthrow P((CONTINUATION *cont, SCM val)); -#define s_cont (ISYMCHARS(IM_CONT)+20) |