give sychronous ResourceLimiter an async alternative

This commit is contained in:
Pat Hickey
2021-09-28 12:21:13 -07:00
parent e04357505e
commit 18a355e092
19 changed files with 373 additions and 236 deletions

View File

@@ -311,12 +311,16 @@ fn massive_64_bit_still_limited() -> Result<()> {
}
impl ResourceLimiter for MyLimiter {
fn memory_growing(&mut self, _request: usize, _min: usize, _max: Option<usize>) -> bool {
fn memory_growing(
&mut self,
_current: usize,
_request: usize,
_max: Option<usize>,
) -> bool {
self.hit = true;
true
}
fn table_growing(&mut self, _request: u32, _min: u32, _max: Option<u32>) -> bool {
fn table_growing(&mut self, _current: u32, _request: u32, _max: Option<u32>) -> bool {
unreachable!()
}
}