Make allocator limit available for the runtime (#9393)

* make allocator limit available

* better inner doc

* move const

* fmt

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Guillaume Thiolliere
2021-07-27 15:04:11 +02:00
committed by GitHub
parent 9c173724fa
commit 23e8088c1c
2 changed files with 16 additions and 3 deletions
+5
View File
@@ -455,3 +455,8 @@ macro_rules! impl_maybe_marker {
)+
}
}
/// The maximum number of bytes that can be allocated at one time.
// The maximum possible allocation size was chosen rather arbitrary, 32 MiB should be enough for
// everybody.
pub const MAX_POSSIBLE_ALLOCATION: u32 = 33554432; // 2^25 bytes, 32 MiB