Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Avoid bb.js memory issues. #578

Merged
merged 1 commit into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions 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