The idea of a 'setTargetMemoryLimitInBytes' function was not really working out. It was too comp-lex and not really clear what the ideal size would be. I think user code needs to call setMaxNumberOfBlocksInMemory() and setMaxNumberOfUncompressedBlocks() directly, if they see from profiling toat too much camressing or paging is taking place.

This commit is contained in:
David Williams
2013-07-23 13:15:01 +02:00
parent 7cd115b33d
commit 7146b5ecdb
4 changed files with 22 additions and 66 deletions

View File

@ -153,9 +153,8 @@ int main(int argc, char *argv[])
RLECompressor<MaterialDensityPair44, uint16_t>* compressor = new RLECompressor<MaterialDensityPair44, uint16_t>();
PerlinNoisePager* pager = new PerlinNoisePager();
LargeVolume<MaterialDensityPair44> volData(PolyVox::Region::MaxRegion, compressor, pager, 256);
//volData.setMaxNumberOfBlocksInMemory(4096);
//volData.setMaxNumberOfUncompressedBlocks(64);
volData.setTargetMemoryLimitInBytes(128 * 1024 * 1024);
volData.setMaxNumberOfBlocksInMemory(4096);
volData.setMaxNumberOfUncompressedBlocks(64);
//volData.setMaxNumberOfUncompressedBlocks(4096);
//createSphereInVolume(volData, 30);