InflatedHeader* InflatedHeaders::allocate(ObjectHeader* obj, uint32_t* index) { bool needs_gc = false; uintptr_t header_index = allocator_->allocate_index(&needs_gc); if(header_index > UINT32_MAX) { rubinius::bug("Rubinius can't handle more than 4G inflated headers active at the same time"); } *index = (uint32_t)header_index; InflatedHeader* header = allocator_->from_index(header_index); header->clear_mark(); if(needs_gc) { state_->om->collect_mature_now = true; } atomic::memory_barrier(); return header; }