From cbed760f3c68fa4238497d9e83e72086131435e2 Mon Sep 17 00:00:00 2001 From: Matthias Arzt Date: Thu, 14 Mar 2024 15:59:46 +0100 Subject: [PATCH] SpotPool: increase capacity, allow more than 23 million spots in Mastodon 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 --- src/main/java/org/mastodon/mamut/model/SpotPool.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/mastodon/mamut/model/SpotPool.java b/src/main/java/org/mastodon/mamut/model/SpotPool.java index 8e3a3c775..3e4af58fe 100644 --- a/src/main/java/org/mastodon/mamut/model/SpotPool.java +++ b/src/main/java/org/mastodon/mamut/model/SpotPool.java @@ -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; @@ -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 ); }