You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/SPECS.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -271,7 +271,7 @@ After executing the cairo program and relocating the memory of the runner, that
271
271
272
272
#### Temporary Memory
273
273
274
-
During execution, temporary segments are stored separated from the memory data and their segment indexes are represented with negative numbers. For their relocation, we use rules that will tell us how to map them to a memory segment.
274
+
During execution, temporary segments are stored separated from the memory data and their segment indexes are represented with negative numbers. For their relocation, we use rules that will tell us how to map them to a real memory segment.
275
275
276
276
> [!NOTE]
277
277
> Relocation rules start at index 0 and temp data segment index start at -1. So for the mapping, segment_index = -1 maps to key 0, segment_index = -2 to key 1, and so on.
@@ -284,18 +284,18 @@ To satisfy requirement 1, Cairo organizes its memory into segments. In our VM we
284
284
-`segment_sizes`: A HashMap that contains the size of each segment
285
285
-`segment_used_sizes`: A Vector of each segment size. Item on index i is the segment size of segment i
286
286
-`memory`: The memory itself, containing the data, temporary data, relocation rules, among other things
287
-
-`public_memory_offsets`: ????????
288
-
-`zero_segment_index`: ????????
289
-
-`zero_segment_size`: ????????
287
+
-`public_memory_offsets`: A HashMap that maps a segment index to a list of offsets for memory cells that represent the public memory
288
+
-`zero_segment_index`: The index of the zero segment that is used for builtins
289
+
-`zero_segment_size`: Size of the zero segment
290
290
291
291
#### Memory
292
292
293
293
The VM memory containing:
294
294
-`data`: A vector of vectors. Each vector representing a different `segment` with its own data
295
295
-`temp_data`: A vector of vectors. Each vector representing a `temporary segment`
296
296
-`relocation_rules`: A hashmap that tells how a temporary segment maps to a to a memory segment
297
-
-`validated_addresses`: ??????
298
-
-`validation_rules`: ??????
297
+
-`validated_addresses`: A vector of `BitVec`
298
+
-`validation_rules`: A vector containing the validation rules
0 commit comments