-
Rust way of dealing with memory allocation코딩Coding/Rust❤️메모리Memory관리_기초상식 2023. 9. 6. 19:19728x90
Rust way of dealing with memory allocation
So I'm following [this](
https://cstack.github.io/db_tutorial/
) tutorial as a kind of side project. But instead of building it in C, like the author did, I'm trying to build it in rust.
In [part 3](https://cstack.github.io/db_tutorial/parts/part3.html), they allocate 4kb chunks to store the data (to match the pagesize), and they just copy the data into that block of memory, like you do in C.
But I was wondering how you would accomplish what the author is doing here (store the data in pages), while sticking to the Rust way of doing things. Sure you _could_ do exactly what they're doing, but is that what you're _supposed_ to do?
https://www.reddit.com/r/rust/comments/ukz786/rust_way_of_dealing_with_memory_allocation/?utm_source=share&utm_medium=ios_app&utm_name=ioscss&utm_content=2&utm_term=1반응형'코딩Coding > Rust❤️메모리Memory관리_기초상식' 카테고리의 다른 글
Working with strings in Rust (0) 2023.09.06 How could I check if my memory allocation is correct? (0) 2023.09.06 JavaScript❤️v8엔진 Garbage Collector이해하기. 파편화된 메모리가 문제구나. 조각 모음할 수도 없고 ㅡㅡ (0) 2023.04.23 memory-safe C++ Jim Radigan CppCon2022 (0) 2023.01.14 C++LeakMemory체크방법❤️Track MEMORY ALLOCATIONS the Easy Way in C++ (0) 2023.01.10 objdump❤️사용법 (0) 2022.08.26 macOS_lldb 사용법 Rust❤️ (0) 2022.06.25 Visualizing Memory❤️스택&힙 잘 표현됨-내가 넣고 코드와 메모리와 설명 Good 👍 (0) 2022.04.25