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.