Skip to content

Commit

Permalink
fix: Avoid bb.js memory issues. (AztecProtocol/barretenberg#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
codygunton authored Jul 5, 2023
1 parent 3c302e6 commit 89f0085
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 1 addition & 12 deletions barretenberg/cpp/src/barretenberg/common/slab_allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,7 @@ void SlabAllocator::init(size_t circuit_size_hint)
// 1; // Miscellaneous.
// /* 6 MiB */ prealloc_num[base_size * 12] = 2 + // next_var_index, prev_var_index
// 2; // real_variable_index, real_variable_tags
/* 16 MiB */ prealloc_num[base_size * 32] = 11 + // Composer base selector vectors.
4 + // Monomial wires.
4 + // Lagrange wires.
15 + // Monomial constraint selectors.
15 + // Lagrange constraint selectors.
8 + // Monomial perm selectors.
8 + // Lagrange perm selectors.
1 + // Monomial sorted poly.
5 + // Lagrange sorted poly.
2 + // Perm poly.
4; // Quotient poly.
// 8; // Miscellaneous.
/* 16 MiB */ prealloc_num[base_size * 32] = 11; // Composer base selector vectors.
/* 32 MiB */ prealloc_num[base_size * 32 * 2] = 1; // Miscellaneous.
/* 50 MiB */ prealloc_num[base_size * 32 * 3] = 1; // Variables.
/* 64 MiB */ prealloc_num[base_size * 32 * 4] = 1 + // SRS monomial points.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace proof_system {

PolynomialStoreCache::PolynomialStoreCache()
: max_cache_size_(70)
: max_cache_size_(40)
{}

PolynomialStoreCache::PolynomialStoreCache(size_t max_cache_size)
Expand Down

0 comments on commit 89f0085

Please sign in to comment.