@Test @DisplayName("dmaAllocate(long, boolean, boolean)") void dmaAllocate() { assumeTrue(mmanager != null); for (val huge : Arrays.asList(false, true)) { for (val lock : Arrays.asList(false, true)) { val bytes = createSize(0xFFFF); val dma = mmanager.dmaAllocate(bytes, huge, lock); val softly = new SoftAssertions(); softly.assertThat(dma.getPhysical()).isNotZero(); softly.assertThat(dma.getPhysical() & (mmanager.getPageSize() - 1)) .isEqualTo(dma.getVirtual() & (mmanager.getPageSize() - 1)); mmanager.free(dma.getVirtual(), bytes, huge, lock); softly.assertAll(); } } }
@Override @Contract(pure = true) public long getPageSize() { return pageSize = super.getPageSize(); }
SmartJniMemoryManager extends JniMemoryManager { @Override @Contract(pure = true) public long getPageSize() { return pageSize = super.getPageSize(); } }
SmartJniMemoryManager extends JniMemoryManager { @Override @Contract(pure = true) public long getPageSize() { return pageSize = super.getPageSize(); } private  SmartJniMemoryManager(); }
SmartJniMemoryManager extends JniMemoryManager { @Override @Contract(pure = true) public long getPageSize() { return pageSize = super.getPageSize(); } private  SmartJniMemoryManager(); @Override @Contract(pure = true) long getPageSize(); @Override @Contract(pure = true) @SuppressWarnings("PMD.DataflowAnomalyAnalysis") long getHugepageSize(); @Override @Contract(pure = true) @SuppressWarnings("PMD.DataflowAnomalyAnalysis") @SuppressFBWarnings("RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE") long virt2phys(final long address); }
SmartJniMemoryManager extends JniMemoryManager { @Override @Contract(pure = true) public long getPageSize() { return pageSize = super.getPageSize(); } private  SmartJniMemoryManager(); @Override @Contract(pure = true) long getPageSize(); @Override @Contract(pure = true) @SuppressWarnings("PMD.DataflowAnomalyAnalysis") long getHugepageSize(); @Override @Contract(pure = true) @SuppressWarnings("PMD.DataflowAnomalyAnalysis") @SuppressFBWarnings("RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE") long virt2phys(final long address);  }