Help understanding pointers | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Help understanding pointers

Please help it doesn't make sense to me

17th Aug 2017, 6:23 PM
Henry Segal
Henry Segal - avatar
5 Answers
+ 6
On modern operating systems, programs are typically split into virtual memory pages, typically 4096 bytes long. It allows for having protected memory regions and not having all of a program loaded into physical memory at once or having to be in a contiguous part of ram. It also has the advantages of avoiding external fragmentation and easy page look ups for converting virtual addresses to physical addresses.
17th Aug 2017, 6:47 PM
aklex
aklex - avatar
+ 2
@Jordan Chapman Not just variables though, they can point to other things such as pages, functions, and modules
17th Aug 2017, 6:33 PM
aklex
aklex - avatar
+ 2
thanks, I'll have to look into that
17th Aug 2017, 6:53 PM
Jordan Chapman
Jordan Chapman - avatar
+ 1
a pointer just holds the memory location of a variable. You will get into more uses for pointers later in the course. also, just a warning: don't use capse lock for posts. It's against guidelines and these guys don't like it
17th Aug 2017, 6:25 PM
Jordan Chapman
Jordan Chapman - avatar
+ 1
ahh, my bad. What do you mean by pages though?
17th Aug 2017, 6:35 PM
Jordan Chapman
Jordan Chapman - avatar