Skip to content

Commit

Permalink
SpotPool: increase capacity, allow more than 23 million spots in Mast…
Browse files Browse the repository at this point in the history
…odon

Using the MultiArrayMemPool rather than SingleArrayMemPool eliminates the
upper bound for the number of Spots in Mastodon. Without this change
Mastodon is limited to approx. 23.3 million spots. Reason for that is that
the SingleArrayMemPool limits the available space for spots to 2 GB.
MultiArrayMemPool removes this limitation.

The are other similar pools in the source code, that probably would need to
be changed to avoid similar problems these are at least:
* LinkPool
* DataGraph
* TrackSchemeGraph
  • Loading branch information
maarzt committed Nov 14, 2024
1 parent cdfb551 commit cbed760
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/mastodon/mamut/model/SpotPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.mastodon.model.AbstractSpotPool;
import org.mastodon.pool.ByteMappedElement;
import org.mastodon.pool.ByteMappedElementArray;
import org.mastodon.pool.SingleArrayMemPool;
import org.mastodon.pool.MultiArrayMemPool;
import org.mastodon.pool.attributes.DoubleArrayAttribute;
import org.mastodon.pool.attributes.DoubleAttribute;
import org.mastodon.properties.ObjPropertyMap;
Expand Down Expand Up @@ -62,7 +62,7 @@ public SpotLayout()

SpotPool( final int initialCapacity )
{
super( initialCapacity, layout, Spot.class, SingleArrayMemPool.factory( ByteMappedElementArray.factory ) );
super( initialCapacity, layout, Spot.class, MultiArrayMemPool.factory( ByteMappedElementArray.factory ) );
label = new ObjPropertyMap<>( this );
registerPropertyMap( label );
}
Expand Down

0 comments on commit cbed760

Please sign in to comment.