chik_consensus/
allocator.rs

1use klvmr::allocator::Allocator;
2use klvmr::chik_dialect::LIMIT_HEAP;
3
4/// Construct an Allocator with a heap-size limit or not, depending on the flags.
5pub fn make_allocator(flags: u32) -> Allocator {
6    if flags & LIMIT_HEAP != 0 {
7        Allocator::new_limited(500_000_000)
8    } else {
9        Allocator::new_limited(u32::MAX as usize)
10    }
11}