Pinned memory
In this article, I will discuss the concept of pinned memory — please note that it will be related to the next article (streaming), so it would be great if you could gain the knowledge in this article.
Before explaining what pinned memory is, I will go over how computers operate when we code for a clearer understanding — and rest assured, I will explain in a simple and easy-to-understand way, so it’s not necessary for you to have knowledge about hardware.
How computer work
When it comes to memory, we always have two perspectives: Physical memory and virtual memory (or logical memory).
- Physical memory: the memory directly installed on the CPU and RAM sticks, connected directly. These are the memory cells located on the motherboard.
- Virtual memory: is an abstract concept (making it easier for programmers to manipulate), which is the memory managed by the operating system or drivers. The OS creates logical memory by using a part of the CPU’s space through mapping from logical to physical address in RAM.
The space of virtual memory is much larger than that of physical memory