summaryrefslogtreecommitdiff
path: root/src/sail_lib.ml
diff options
context:
space:
mode:
authorPrashanth Mundkur2018-07-09 16:49:31 -0700
committerPrashanth Mundkur2018-07-09 16:49:31 -0700
commit85def9a2d488cc2d74394663f9f6323258e5fa59 (patch)
treeaa02700a7a6e0d7be74f7902107747bf1bc74a9b /src/sail_lib.ml
parent1f950bdf4f6f80b472ec06eb07a3144666840126 (diff)
Initialize fresh memory to 0 in the OCaml backend.
This makes it consistent with the C backend, and also makes it easier to compare traces across execution re-runs.
Diffstat (limited to 'src/sail_lib.ml')
-rw-r--r--src/sail_lib.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sail_lib.ml b/src/sail_lib.ml
index ab621342..63260c17 100644
--- a/src/sail_lib.ml
+++ b/src/sail_lib.ml
@@ -419,7 +419,7 @@ let get_mem_page p =
try
Mem.find p !mem_pages
with Not_found ->
- let new_page = Bytes.create page_size_bytes in
+ let new_page = Bytes.make page_size_bytes '\000' in
mem_pages := Mem.add p new_page !mem_pages;
new_page