@@ -189,6 +189,8 @@ pub struct View {
189189 pub ( crate ) debug_logs : Vec < Vec < u8 > > ,
190190 pub ( crate ) program_memory : ProgramInfo ,
191191 pub ( crate ) initial_memory : Vec < MemoryInitializationEntry > ,
192+ /// The number of all addresses under RAM memory checking
193+ pub ( crate ) tracked_ram_size : usize ,
192194 pub ( crate ) exit_code : Vec < PublicOutputEntry > ,
193195 pub ( crate ) output_memory : Vec < PublicOutputEntry > ,
194196 // todo: incorporate into initial memory
@@ -197,11 +199,13 @@ pub struct View {
197199
198200impl View {
199201 /// Construct a view out of its raw parts.
202+ #[ allow( clippy:: too_many_arguments) ] // extra thought needed what's the best approach to reduce args
200203 pub fn new (
201204 memory_layout : & Option < LinearMemoryLayout > ,
202205 debug_logs : & Vec < Vec < u8 > > ,
203206 program_memory : & ProgramInfo ,
204207 initial_memory : & Vec < MemoryInitializationEntry > ,
208+ tracked_ram_size : usize ,
205209 exit_code : & Vec < PublicOutputEntry > ,
206210 output_memory : & Vec < PublicOutputEntry > ,
207211 associated_data : & Vec < u8 > ,
@@ -211,6 +215,7 @@ impl View {
211215 debug_logs : debug_logs. to_owned ( ) ,
212216 program_memory : program_memory. to_owned ( ) ,
213217 initial_memory : initial_memory. to_owned ( ) ,
218+ tracked_ram_size,
214219 exit_code : exit_code. to_owned ( ) ,
215220 output_memory : output_memory. to_owned ( ) ,
216221 associated_data : associated_data. to_owned ( ) ,
@@ -247,6 +252,11 @@ impl View {
247252 . map ( |layout| io_entries_into_vec ( layout. public_output_start ( ) , & self . output_memory ) )
248253 }
249254
255+ /// Return the number of all addresses under RAM memory checking.
256+ pub fn view_tracked_ram_size ( & self ) -> usize {
257+ self . tracked_ram_size
258+ }
259+
250260 /// Return the raw bytes of the associated data, if any.
251261 pub fn view_associated_data ( & self ) -> Option < Vec < u8 > > {
252262 if self . memory_layout . is_some ( ) {
0 commit comments