File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,15 @@ use crate::segments::{
99
1010pub const DEFAULT_MAX_PAGE_LEN_NODES : u32 = 131_072 ; // 2^17
1111pub const DEFAULT_MAX_PAGE_LEN_EDGES : u32 = 1_048_576 ; // 2^20
12+ pub const DEFAULT_MAX_MEMORY_BYTES : usize = 32 * 1024 * 1024 ;
1213
1314pub trait Config :
1415 Default + std:: fmt:: Debug + Clone + Send + Sync + ' static + for < ' a > Deserialize < ' a > + Serialize
1516{
1617 fn max_node_page_len ( & self ) -> u32 ;
1718 fn max_edge_page_len ( & self ) -> u32 ;
19+
20+ fn max_memory_bytes ( & self ) -> usize ;
1821 fn is_parallel ( & self ) -> bool ;
1922 fn node_types ( & self ) -> & [ String ] ;
2023 fn set_node_types ( & mut self , types : impl IntoIterator < Item = impl AsRef < str > > ) ;
@@ -70,6 +73,10 @@ impl Config for NoOpStrategy {
7073 self . max_edge_page_len
7174 }
7275
76+ fn max_memory_bytes ( & self ) -> usize {
77+ usize:: MAX
78+ }
79+
7380 fn is_parallel ( & self ) -> bool {
7481 false
7582 }
You can’t perform that action at this time.
0 commit comments