3 #if defined(WINDOWS) && defined(FACTOR_64)
4 const cell seh_area_size = 1024;
6 const cell seh_area_size = 0;
10 // The actual memory area
13 // Memory area reserved for safepoint guard page
16 // Memory area reserved for SEH. Only used on Windows
20 free_list_allocator<code_block>* allocator;
22 // For fast lookup of blocks from addresses.
23 std::set<cell> all_blocks;
26 // Code blocks are initialized in two steps in
27 // primitive_modify_code_heap() because they might reference each
28 // other. First they are all allocated and placed in this map with
29 // their literal tables which are GC roots until the block is
30 // initialized. Then they are all initialized by
31 // initialize_code_block() which resolves relocations and updates
32 // addresses. Uninitialized blocks instructions must not be visited
34 std::map<code_block*, cell> uninitialized_blocks;
36 // Code blocks which may reference objects in the nursery
37 std::set<code_block*> points_to_nursery;
39 // Code blocks which may reference objects in aging space or the nursery
40 std::set<code_block*> points_to_aging;
42 explicit code_heap(cell size);
44 void write_barrier(code_block* compiled);
45 void clear_remembered_set();
46 bool uninitialized_p(code_block* compiled);
47 void free(code_block* compiled);
49 void set_safepoint_guard(bool locked);
50 void verify_all_blocks_set();
51 void initialize_all_blocks_set();
52 cell high_water_mark() { return allocator->size / 20; }
56 code_block* code_block_for_address(cell address);
57 cell frame_predecessor(cell frame_top);
59 bool safepoint_p(cell addr) {
60 cell page_mask = ~(getpagesize() - 1);
61 return (addr & page_mask) == safepoint_page;