FreeListManager { long getFreeTinyMemory() { long tinyFree = 0; for (int i = 0; i < this.tinyFreeLists.length(); i++) { OffHeapStoredObjectAddressStack cl = this.tinyFreeLists.get(i); if (cl != null) { tinyFree += cl.computeTotalSize(); } } return tinyFree; } FreeListManager(MemoryAllocatorImpl ma, final Slab[] slabs); long getUsedMemory(); long getFreeMemory(); @SuppressWarnings("synthetic-access") OffHeapStoredObject allocate(int size); @SuppressWarnings("synthetic-access") void free(long addr); static final int TINY_MULTIPLE; static final int TINY_FREE_LIST_COUNT; static final int HUGE_MULTIPLE; static final int MAX_TINY; }
@Test public void freeTinyMemoryDefault() { setUpSingleSlabManager(); assertThat(this.freeListManager.getFreeTinyMemory()).isZero(); }