Tracking/limiting memory allocator (#1192)

This commit is contained in:
s0me0ne-unkn0wn authored and GitHub committed 2023-11-03 17:48:41 +02:00
1 parent 8cfbee706d
commit cd2d5d2579
19 files changed
+569 -58

No files matched your search

@@ -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::*;