Answer the question
In order to leave comments, you need to log in
Is there any classical literature about working with memory, using C or C++ as an example?
Is there any classical literature about working with memory, using C or C++ as an example? That is, how data is stored, how various pointers, links, and so on work.
Answer the question
In order to leave comments, you need to log in
K&R2
https://en.wikipedia.org/wiki/The_C_Programming_La...
There, in the 8th chapter, the principle of the memory allocation functions is described, and then you also write your own memory manager.
Memory is represented by a linked list of blocks, which are sliced into chunks when allocated and glued into larger blocks when deallocated. (There are other memory managers like Python's.)
Here it is: rus-linux.net/lib.php?name=/MyLDP/hard/memory/memo... (there are examples in C, if I remember correctly).
And then any textbook on C++ or K&R on C.
It is not very clear what exactly you mean by "how data is stored" and "how memory is arranged, how to handle it." I would venture to advise you to read about the arrangement of memory allocators, stack (si-runtime), memory subsystems in Linux (mm). After that, hardly anything can scare you.
Where to watch it - the second question. Books in my opinion are too general and usually outdated. The quality and depth of the explanation is also not always excellent. Google better relatively recent articles with good reviews
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question