Reputation: 1337
I know that any data could be cached from main memory to cache memory that provides faster access from the CPU than does main memory.
I know as well that each thread has it's own stack memory.
So the question is, could the program/code memory be cached as well? or is the caching exclusive to data blocks, not instructions block?
Upvotes: 1
Views: 65
Reputation: 8928
Yes, the machine instructions of the program can be cached as well. In fact, some processors have separate caches for instructions and data, while in other processors they share a single cache.
Upvotes: 1