mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-21 01:41:03 +00:00
Tracking/limiting memory allocator (#1192)
This commit is contained in:
@@ -197,6 +197,16 @@ impl ExecutorParams {
|
||||
None
|
||||
}
|
||||
|
||||
/// Returns pre-checking memory limit, if any
|
||||
pub fn prechecking_max_memory(&self) -> Option<u64> {
|
||||
for param in &self.0 {
|
||||
if let ExecutorParam::PrecheckingMaxMemory(limit) = param {
|
||||
return Some(*limit)
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
/// Check params coherence.
|
||||
pub fn check_consistency(&self) -> Result<(), ExecutorParamError> {
|
||||
use ExecutorParam::*;
|
||||
|
||||
Reference in New Issue
Block a user