Search in sources :

Example 1 with ScopedMemoryTracker

use of org.neo4j.memory.ScopedMemoryTracker in project neo4j by neo4j.

the class MuninnPageCacheTest method createFixture.

@Override
protected Fixture<MuninnPageCache> createFixture() {
    ConfigurableIOBufferFactory bufferFactory = new ConfigurableIOBufferFactory(Config.defaults(pagecache_buffered_flush_enabled, true), new ScopedMemoryTracker(INSTANCE));
    fixture = new MuninnPageCacheFixture();
    fixture.withBufferFactory(bufferFactory);
    return fixture;
}
Also used : ScopedMemoryTracker(org.neo4j.memory.ScopedMemoryTracker) ConfigurableIOBufferFactory(org.neo4j.configuration.pagecache.ConfigurableIOBufferFactory)

Example 2 with ScopedMemoryTracker

use of org.neo4j.memory.ScopedMemoryTracker in project neo4j by neo4j.

the class LongProbeTable method createLongProbeTable.

public static <V extends Measurable> LongProbeTable<V> createLongProbeTable(MemoryTracker memoryTracker) {
    MemoryTracker scopedMemoryTracker = memoryTracker.getScopedMemoryTracker();
    scopedMemoryTracker.allocateHeap(SHALLOW_SIZE + SCOPED_MEMORY_TRACKER_SHALLOW_SIZE);
    return new LongProbeTable<>(scopedMemoryTracker);
}
Also used : ScopedMemoryTracker(org.neo4j.memory.ScopedMemoryTracker) MemoryTracker(org.neo4j.memory.MemoryTracker)

Aggregations

ScopedMemoryTracker (org.neo4j.memory.ScopedMemoryTracker)2 ConfigurableIOBufferFactory (org.neo4j.configuration.pagecache.ConfigurableIOBufferFactory)1 MemoryTracker (org.neo4j.memory.MemoryTracker)1