From what I've read, fragmentation is a problem because only contiguous blocks of memory can be allocated. Why is this? Since data in RAM can be accessed in any order, can't non-contiguous blocks of memory be read just as fast? I've been thinking about this because I read that fragmentation of SSDs isn't a problem since they're random access.
Asked
Active
Viewed 488 times
3
-
2http://www.akkadia.org/drepper/cpumemory.pdf‎ – user2485710 Feb 09 '14 at 15:50
-
You can't allocate a single array in two non-contiguous chunks of memory. Also, CPU cache coherency. – SLaks Feb 09 '14 at 15:50
-
@SLaks Thanks I'll be learning more about cache coherency soon. I've been learning about kernels though, and it seems like linked list are a commonly used data structure. Is it because they don't need to be stored contiguously? – user3289912 Feb 09 '14 at 16:00