From 0d38d039ada2c2c3f9250a0a132b886b7c97c0e7 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Thu, 14 Sep 2023 20:22:14 +0100 Subject: [PATCH] rust box: fix address "one byte" apart --- _posts/2022-06-16-rust-boxed-str-vs-string.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2022-06-16-rust-boxed-str-vs-string.md b/_posts/2022-06-16-rust-boxed-str-vs-string.md index 73cd0af..acf34db 100644 --- a/_posts/2022-06-16-rust-boxed-str-vs-string.md +++ b/_posts/2022-06-16-rust-boxed-str-vs-string.md @@ -81,7 +81,7 @@ Process 65188 stopped ``` Our program allocates two variables on the stack directly here. Notice that they -are allocated right next to each other, their address only one bit apart. Most +are allocated right next to each other, their address only one byte apart. Most primitive types are allocated on the stack, and are copied when being passed around because they are small enough, so that copying them around is more reasonable than allocating them in the heap and passing around a pointer to