SQL Server memory is primarily used to store data (buffer) and query plans
(procedure cache). In this article I'll show how much memory is allocated to the procedure
cache (RAM). I'll explain how to determine what plans are in the cache and how
often they're used.
Read What Query Plans are in SQL Server's Memory?