what is cache memory | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

what is cache memory

Hi I know we have cache memory and we can use it to quickly access some information rather than going into core memory. Is this different from virtual memory? Also how to use cache memory in simple c++ application? Any pointers on this would be a great help.

16th Jun 2020, 3:28 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
3 Answers
16th Jun 2020, 4:38 PM
$ยข๐Žโ‚น๐”ญ!๐จ๐“
$ยข๐Žโ‚น๐”ญ!๐จ๐“ - avatar
+ 1
Cache Memory is a special very high-speed memory. It is used to speed up and synchronizing with high-speed CPU. Cache memory is costlier than main memory or disk memory but economical than CPU registers. Cache memory is an extremely fast memory type that acts as a buffer between RAM and the CPU. It holds frequently requested data and instructions so that they are immediately available to the CPU when needed. It is the fastest memory which has faster access time where data is temporarily stored for faster access.
22nd Jun 2020, 8:07 AM
KALIDINDI CHAYA PRAKASH
KALIDINDI CHAYA PRAKASH - avatar
+ 1
But does this enough of size to store custom object to be placed in vector? Is cache used only for storing some counter or more than that is there?
22nd Jun 2020, 9:22 AM
Ketan Lalcheta
Ketan Lalcheta - avatar