library/src/mmap/BP-MMapSlabAllocator.cc
// walk the entries and free (aka unmark/mark) entries
walk the entries and free (aka unmark/mark) entries
walk the entries and free ( aka unmark / mark ) entries
BP_SLAB_ALLOCATOR_ITER_LOOP(allocator, entry_ptr)
	{
		if(BP_FLAG_IS_SET(allocator->curr_entry->flags, BP_MMAP_SLAB_ENTRY_INFO_NEXT_IS_GROUPED))
		{
			has_next = BP_TRUE;
		}
		if(!last_hdr)
		{
			last_hdr = allocator->curr_entry;
		}
		else
		{
			if(last_hdr == allocator->curr_entry)
				printf("\n DUPLICATE CHUNKS DETECTED DURING FREE, ERROR");
		}
		allocator->curr_entry->flags = BP_MMAP_SLAB_ENTRY_INFO_NONE;
		BP_SET_FLAG(allocator->curr_entry->flags, BP_MMAP_SLAB_ENTRY_INFO_AVAILABLE);
		if(!has_next)
			break;
		has_next = BP_FALSE;
		last_hdr = allocator->curr_entry;
	}
BP_SLAB_ALLOCATOR_ITER_LOOP ( allocator , entry_ptr ) { if ( BP_FLAG_IS_SET ( allocator -> curr_entry -> flags , BP_MMAP_SLAB_ENTRY_INFO_NEXT_IS_GROUPED ) ) { has_next = BP_TRUE ; } if ( ! last_hdr ) { last_hdr = allocator -> curr_entry ; } else { if ( last_hdr == allocator -> curr_entry ) printf ( " \n " ) ; } allocator -> curr_entry -> flags = BP_MMAP_SLAB_ENTRY_INFO_NONE ; BP_SET_FLAG ( allocator -> curr_entry -> flags , BP_MMAP_SLAB_ENTRY_INFO_AVAILABLE ) ; if ( ! has_next ) break ; has_next = BP_FALSE ; last_hdr = allocator -> curr_entry ; }
walk the entries and free (aka unmark/mark) entries
walk the entries and free ( aka unmark / mark ) entries
// check flags are set // printf("\n Chunk has next?"); // zero out flags first // after the chunk is updated set the flag indicating that the chunk is available for use // break if there is no next // overide flag