diff --git a/README.md b/README.md index 303fb6bdd87a5e984cd374b31afdf366cd637aab..b2f07c20339f9515867dc0dd2816336c583efb00 100644 --- a/README.md +++ b/README.md @@ -145,11 +145,11 @@ Seminars You have to be careful about the signed/unsigned operations and use `wrapping` arithmetics to avoid panics due to unsigned *carry* and signed *overflow*. - Use borrowed array slices as arguments to `decode`. + Use borrowed array slices as arguments to `decode`. The `seed`, `abc`,`coded` and `plain` should be stack allocated. The decoded string should be printed when decryption is finished. - b. Make the `seed`, `abc`,`coded` and `plain` heap allocated. Accessing those will require some `unsafe` code. (Keep the unsafe blocks as local as possible.) + b. Make the `seed`, `abc`,`coded` and `plain` heap allocated. Accessing those will require some `unsafe` code. (Keep the unsafe blocks as local as possible, perhaps you can do all in *safe* Rust.) c. Safety analysis. Provoke the implementation, by omitting the `'\0'` (null termination). Observe the result and motivate the behavior in terms of your understanding of the Rust memory model. Under which circumstances do you consider 3a and 3b to have same/different memory safety. diff --git a/doc/Memory.md b/doc/Memory.md index 4a112d3267d3fb56ad2765cbdfda13897f68a3c6..6d3c452a3dd64bdbd1800e013cbbf71317ac37b8 100644 --- a/doc/Memory.md +++ b/doc/Memory.md @@ -84,7 +84,6 @@ Thus, only for cases when *true* random access is desired/required, raw indexing In short, the complilation process can be broken down to the following steps: - 1. Parsing input * this processes the .rs files and produces the AST ("abstract syntax tree")