void sgen_free_internal_dynamic (void *addr, size_t size, int type) { if (!addr) return; if (size > allocator_sizes [NUM_ALLOCATORS - 1]) sgen_free_os_memory (addr, size, SGEN_ALLOC_INTERNAL, MONO_MEM_ACCOUNT_SGEN_INTERNAL); else mono_lock_free_free (addr, block_size (size)); }
void sgen_free_internal (void *addr, int type) { int index; if (!addr) return; index = fixed_type_allocator_indexes [type]; g_assert (index >= 0 && index < NUM_ALLOCATORS); mono_lock_free_free (addr); }
void sgen_free_internal_dynamic (void *addr, size_t size, int type) { if (!addr) return; if (size > allocator_sizes [NUM_ALLOCATORS - 1]) { sgen_free_os_memory (addr, size, SGEN_ALLOC_INTERNAL); return; } mono_lock_free_free (addr); }
void sgen_free_internal_dynamic (void *addr, size_t size, int type) { if (!addr) return; if (size > allocator_sizes [NUM_ALLOCATORS - 1]) sgen_free_os_memory (addr, size, SGEN_ALLOC_INTERNAL); else mono_lock_free_free (addr); MONO_GC_INTERNAL_DEALLOC ((mword)addr, size, type); }
void sgen_free_internal_dynamic (void *addr, size_t size, int type) { int index; if (!addr) return; if (size > allocator_sizes [NUM_ALLOCATORS - 1]) return sgen_free_os_memory (addr, size); index = index_for_size (size); mono_lock_free_free (addr); }
void sgen_free_internal (void *addr, int type) { int index; if (!addr) return; index = fixed_type_allocator_indexes [type]; g_assert (index >= 0 && index < NUM_ALLOCATORS); mono_lock_free_free (addr); if (MONO_GC_INTERNAL_DEALLOC_ENABLED ()) { int size G_GNUC_UNUSED = allocator_sizes [index]; MONO_GC_INTERNAL_DEALLOC ((mword)addr, size, type); } }