# Why is a pointer constant space?

If a pointer specifies a point in memory, would the amount of space a pointer takes not be dependent on how much memory it could possibly range over?

So for example, if we have 4 locations of memory and a pointer, then the pointer can be 2 bits, but if we have $2^k$, we will need $k$ bits.

My confusion stems from people who say that a fixed number of pointers is $O(1)$ space complexity.

• Space is measured in machine words in the usual model of computation used to analyze algorithms, the RAM machine. Apr 20 '18 at 20:39
• What do they mean by a fixed number of pointers? Apr 20 '18 at 20:56
• en.wikipedia.org/wiki/Transdichotomous_model
– D.W.
Apr 20 '18 at 21:55