From f45b45459c1b6b76c22463a2935651288dac6a13 Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Thu, 14 Jun 2018 16:37:54 +0300 Subject: [PATCH] Calibrate the limits. --- src/runner.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/runner.rs b/src/runner.rs index 20ab4b5..8c9eb2f 100644 --- a/src/runner.rs +++ b/src/runner.rs @@ -20,11 +20,10 @@ use nan_preserving_float::{F32, F64}; use isa; /// Maximum number of entries in value stack. -pub const DEFAULT_VALUE_STACK_LIMIT: usize = 16 * 1024; +pub const DEFAULT_VALUE_STACK_LIMIT: usize = (512 * 1024) / ::std::mem::size_of::(); -// TODO: Do the initial calibration. // TODO: Make these parameters changeble. -pub const DEFAULT_CALL_STACK_LIMIT: usize = 1024; +pub const DEFAULT_CALL_STACK_LIMIT: usize = 16 * 1024; /// Interpreter action to execute after executing instruction. pub enum InstructionOutcome {