public static void init( int numberOfBuffers, int size, int initialCapacity, int concurrencyLevel) { map = new MapMaker() .concurrencyLevel(concurrencyLevel) .initialCapacity(initialCapacity) .makeMap(); logger.info("*** initializing *******************************\r\n" + Format.logo()); logger.info("************************************************"); MemoryManager.init(numberOfBuffers, size); logger.info("initialized"); logger.info( Format.it("number of buffer(s): \t%1d with %2s each", numberOfBuffers, Ram.inMb(size))); logger.info(Format.it("initial capacity: \t%1d", initialCapacity)); logger.info(Format.it("concurrency level: \t%1d", concurrencyLevel)); }
private static void dump(OffHeapMemoryBuffer mem) { logger.info(Format.it("off-heap - buffer: \t%1d", mem.bufferNumber)); logger.info(Format.it("off-heap - allocated: \t%1s", Ram.inMb(mem.capacity()))); logger.info(Format.it("off-heap - used: \t%1s", Ram.inMb(mem.used()))); logger.info(Format.it("heap - max: \t%1s", Ram.inMb(Runtime.getRuntime().maxMemory()))); logger.info( Format.it("heap - allocated: \t%1s", Ram.inMb(Runtime.getRuntime().totalMemory()))); logger.info(Format.it("heap - free : \t%1s", Ram.inMb(Runtime.getRuntime().freeMemory()))); logger.info("************************************************"); }