We know LPIM privilege is required for LPIM and large page for SQL server but how does SQL server know your account has the privilege set in the local security policy.
The answer is AdjustTokenPrivileges
I have not find the way to determine the value for the function return. The same call stack is present whether the LPIM privilege is set or not . This is reasonable because either way, SQL server needs to check the privilege.
The another difference shows in the error log.
When LPIM is enable :
2013-11-04 20:15:24.71 Server Using locked pages in the memory manager.
When LPIM is not enable:
2013-11-04 20:30:44.16 Server Using conventional memory in the memory manager.
When Host has more than 8GB memory, Enterprise edition SQL server and LPIM privilege.
2013-11-04 20:50:20.91 Server Using locked pages in the memory manager.
2013-11-04 20:50:21.31 Server Large Page Allocated: 32MB