diff --git a/CHANGELOG.md b/CHANGELOG.md index 376478fd..cbc6000b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All significant changes to this project will be documented in this file. ### New features -* Add immutable `XorFilter` and `XorFilterBuilder` behind the `xor` feature, with 8-, 16-, and 32-bit fingerprints, consuming builder configuration with complete-input construction and bounded seeded retries, optional cardinality metadata for imported filters, standard serialization for all three widths (Java-compatible for 8/16-bit filters), and raw parts for application-defined storage. +* Add immutable `XorFilter` and `XorFilterBuilder` behind the `xor` feature, with 8-, 16-, and 32-bit fingerprints, consuming builder configuration with complete-input construction, bounded seeded retries and compact temporary storage, optional cardinality metadata for imported filters, standard serialization for all three widths (Java-compatible for 8/16-bit filters), and raw parts for application-defined storage. ### Improvements diff --git a/datasketches/src/xor/filter.rs b/datasketches/src/xor/filter.rs index 0762b408..0bf297b0 100644 --- a/datasketches/src/xor/filter.rs +++ b/datasketches/src/xor/filter.rs @@ -405,6 +405,12 @@ impl XorFilter { .with_context("num_items", num_items)); } + // Assignment only needs the peel stack. Release the graph before allocating the + // fingerprint payload so these allocations do not overlap at peak memory usage. + drop(xor_mask); + drop(count); + drop(queue); + let fingerprints = match filter_type { XorFilterType::Xor8 => { let mut values = vec![0_u8; capacity].into_boxed_slice();