mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-15 03:21:06 +00:00
20e77cb0b5
- Allow configuration of the maximum heap and stack size via CLI flags and JSON input settings. - Increase the default value for the stack size to 32kb. --------- Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
22 lines
526 B
Rust
22 lines
526 B
Rust
//! The compile time PolkaVM memory configuration settings.
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
/// The PolkaVM memory configuration.
|
|
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
|
|
pub struct MemoryConfig {
|
|
/// The emulated EVM linear heap memory size in bytes.
|
|
pub heap_size: u32,
|
|
/// The PVM stack size in bytes.
|
|
pub stack_size: u32,
|
|
}
|
|
|
|
impl Default for MemoryConfig {
|
|
fn default() -> Self {
|
|
Self {
|
|
heap_size: 64 * 1024,
|
|
stack_size: 32 * 1024,
|
|
}
|
|
}
|
|
}
|