@Test public void testGetAllocLen() throws Exception { long adr = Uns.allocate(MIN_ALLOC_LEN); try { HashEntries.init(0x98765432abcddeafL, 0, 10, adr, 0, 0L); assertEquals(HashEntries.getAllocLen(adr), Util.ENTRY_OFF_DATA + 10L); HashEntries.init(0x98765432abcddeafL, 5, 10, adr, 0, 0L); assertEquals(HashEntries.getAllocLen(adr), Util.ENTRY_OFF_DATA + 8L + 10L); HashEntries.init(0x98765432abcddeafL, 8, 10, adr, 0, 0L); assertEquals(HashEntries.getAllocLen(adr), Util.ENTRY_OFF_DATA + 8L + 10L); HashEntries.init(0x98765432abcddeafL, 9, 10, adr, 0, 0L); assertEquals(HashEntries.getAllocLen(adr), Util.ENTRY_OFF_DATA + 16L + 10L); HashEntries.init(0x98765432abcddeafL, 15, 10, adr, 0, 0L); assertEquals(HashEntries.getAllocLen(adr), Util.ENTRY_OFF_DATA + 16L + 10L); HashEntries.init(0x98765432abcddeafL, 16, 10, adr, 0, 0L); assertEquals(HashEntries.getAllocLen(adr), Util.ENTRY_OFF_DATA + 16L + 10L); } finally { Uns.free(adr); } }
static long getAllocLen(long hashEntryAdr) { return Util.allocLen(getKeyLen(hashEntryAdr), getValueLen(hashEntryAdr)); }
HashEntries { static long getAllocLen(long hashEntryAdr) { return Util.allocLen(getKeyLen(hashEntryAdr), getValueLen(hashEntryAdr)); } }
HashEntries { static long getAllocLen(long hashEntryAdr) { return Util.allocLen(getKeyLen(hashEntryAdr), getValueLen(hashEntryAdr)); }  }
HashEntries { static long getAllocLen(long hashEntryAdr) { return Util.allocLen(getKeyLen(hashEntryAdr), getValueLen(hashEntryAdr)); }   }
HashEntries { static long getAllocLen(long hashEntryAdr) { return Util.allocLen(getKeyLen(hashEntryAdr), getValueLen(hashEntryAdr)); }    }