Aladdin
Aladdin

Reputation: 1337

Code/Program memory and caching

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

Answers (1)

Warren Dew
Warren Dew

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

Related Questions