Felisyn patch 0002: BlockVector block size 64 elements instead of 1,024. Applies to: NEST at 41892a50f95ddf50966e2371151b207d098e814a, on a copy (patch -p1). Approved on 7 Nov 2026 as change (2) of two approved source changes. Reason. PyNN connects every neuron to its spike recorder, and NEST keeps each neuron's device connections in a Connector of its own. An empty BlockVector allocates one full block, so a list holding one connection costs 1,024 x 32 B: 18,600 x 32,768 B = 0.568 GiB on the 2 mm model. With shift 6 each list costs 64 x 32 B. Evidence: memory-study.md sections 1 and 3 (R2), logs/memory-study/results-nest.txt. Change. One constant. No other NEST code reads it, except the BlockVector tests through its getter. The block size sets how elements are stored, not their order: sort.h sorts by position through iterators. Byte-identity proof on this Mac: logs/proof-bytes.txt. --- a/libnestutil/block_vector.h +++ b/libnestutil/block_vector.h @@ -36,7 +36,7 @@ template < typename value_type_, typename ref_, typename ptr_ > class bv_iterator; -constexpr int block_size_shift = 10; //!< max_block_size = 2^block_size_shift +constexpr int block_size_shift = 6; //!< max_block_size = 2^block_size_shift constexpr int max_block_size = 1L << block_size_shift; constexpr int max_block_size_sub_1 = max_block_size - 1;