db4o comes with two freespace systems, one holds all freespace information in RAM, the other uses the internal indexing architecture. You can configure db4o to use either of the two by calling
.NET: configuration.Freespace().UseRamSystem()
or
.NET: configuration.Freespace().UseIndexSystem()
This call should be made before you open the database for the first time
By default db4o uses RAM freespace management system. The information about free slots is loaded into memory on opening a database file and discarded on closing it. This system is quite fast, but it has its downside:
RAM-based freespace management is a good performance solution, but it can be insufficient for the systems with limited RAM resources and high probability of abnormal system termination (power failure on mobile devices).
In order to meet the requirements of such environments new index-based freespace management system was built. It solves the problems of RAM-based system:
How it works?:
Index-based freespace system can show poorer performance compared to RAM-based system, as file access for index traversal it comparatively slow.
However, index-based freespace system can be a reasonable solution for mobile devices, where file access is not much slower than RAM-access, and ACID transactions together with low memory consumption are most valuable factors.