USE master
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE WITH OVERRIDE
-- enable lookup of set memory usage
USE master
EXEC sp_configure 'max server memory (MB)', 256;
-- here the max memory used by the sql instance is 256MB
RECONFIGURE WITH OVERRIDE
USE master
EXEC sp_configure 'show advanced options', 0;
RECONFIGURE WITH OVERRIDE
-- disable set of memory usage