4 struct factor_vm_data {
5 // if you change this struct, also change vm.factor k--------
7 zone nursery; /* new objects are allocated here */
10 cell userenv[USER_ENV]; /* TAGGED user environment data; see getenv/setenv prims */
12 // -------------------------------
15 cell ds_size, rs_size;
16 context *unused_contexts;
19 cell T; /* Canonical T object. It's just a word */
25 /* Global variables used to pass fault handler state from signal handler to
28 cell signal_fault_addr;
29 unsigned int signal_fpu_status;
30 stack_frame *signal_callstack_top;
33 bool secure_gc; /* Set by the -securegc command line argument */
34 bool gc_off; /* GC is off during heap walking */
36 /* A heap walk allows useful things to be done, like finding all
37 references to an object for debugging purposes. */
40 cell allot_markers_offset;
42 /* used during garbage collection only */
45 bool performing_compaction;
47 /* if true, we are collecting aging space for the second time, so if it is still
48 full, we go on to collect tenured */
49 bool collecting_aging_again;
50 /* in case a generation fills up in the middle of a gc, we jump back
51 up to try collecting the next generation. */
53 gc_stats stats[max_gen_count];
58 /* What generation was being collected when copy_code_heap_roots() was last
59 called? Until the next call to add_code_block(), future
60 collections of younger generations don't have to touch the code
62 cell last_code_heap_scan;
63 /* sometimes we grow the heap */
64 bool growing_data_heap;
65 data_heap *old_data_heap;
68 /* If a runtime function needs to call another function which potentially
69 allocates memory, it must wrap any local variable references to Factor
70 objects in gc_root instances */
71 std::vector<cell> gc_locals;
72 std::vector<cell> gc_bignums;
87 unordered_map<heap_block *, char *> forwarding;
90 cell code_relocation_base;
91 cell data_relocation_base;
94 cell megamorphic_cache_hits;
95 cell megamorphic_cache_misses;
99 cell cold_call_to_ic_transitions;
100 cell ic_to_pic_transitions;
101 cell pic_to_mega_transitions;
102 cell pic_counts[4]; /* PIC_TAG, PIC_HI_TAG, PIC_TUPLE, PIC_HI_TAG_TUPLE */
105 : profiling_p(false),
108 performing_gc(false),
109 performing_compaction(false),
110 collecting_aging_again(false),
111 growing_data_heap(false),
116 memset(this,0,sizeof(this)); // just to make sure