major_alloc_heap (mword nursery_size, mword nursery_align, int the_nursery_bits)
{
if (nursery_align)
- nursery_start = sgen_alloc_os_memory_aligned (nursery_size, nursery_align, TRUE);
+ nursery_start = sgen_alloc_os_memory_aligned (nursery_size, nursery_align, TRUE, TRUE, "nursery");
else
- nursery_start = sgen_alloc_os_memory (nursery_size, TRUE);
+ nursery_start = sgen_alloc_os_memory (nursery_size, TRUE, TRUE, "nursery");
nursery_end = nursery_start + nursery_size;
nursery_bits = the_nursery_bits;
GCMemSection *section;
int scan_starts;
- section = sgen_alloc_os_memory_aligned (MAJOR_SECTION_SIZE, MAJOR_SECTION_SIZE, TRUE);
+ section = sgen_alloc_os_memory_aligned (MAJOR_SECTION_SIZE, MAJOR_SECTION_SIZE, TRUE, TRUE, "major heap section");
section->next_data = section->data = (char*)section + SGEN_SIZEOF_GC_MEM_SECTION;
g_assert (!((mword)section->data & 7));
section->size = MAJOR_SECTION_SIZE - SGEN_SIZEOF_GC_MEM_SECTION;
sgen_update_heap_boundaries ((mword)section->data, (mword)section->end_data);
DEBUG (3, fprintf (gc_debug_file, "New major heap section: (%p-%p), total: %lld\n", section->data, section->end_data, (long long int)mono_gc_get_heap_size ()));
scan_starts = (section->size + SGEN_SCAN_START_SIZE - 1) / SGEN_SCAN_START_SIZE;
- section->scan_starts = sgen_alloc_internal_dynamic (sizeof (char*) * scan_starts, INTERNAL_MEM_SCAN_STARTS);
+ section->scan_starts = sgen_alloc_internal_dynamic (sizeof (char*) * scan_starts, INTERNAL_MEM_SCAN_STARTS, TRUE);
section->num_scan_start = scan_starts;
section->block.role = MEMORY_ROLE_GEN1;
section->is_to_space = TRUE;
DEBUG (3, fprintf (gc_debug_file, "Freed major section %p (%p-%p)\n", section, section->data, section->end_data));
sgen_free_internal_dynamic (section->scan_starts,
(section->size + SGEN_SCAN_START_SIZE - 1) / SGEN_SCAN_START_SIZE * sizeof (char*), INTERNAL_MEM_SCAN_STARTS);
- sgen_free_os_memory (section, MAJOR_SECTION_SIZE);
+ sgen_free_os_memory (section, MAJOR_SECTION_SIZE, TRUE);
--num_major_sections;
}