![]() |
![]() |
#1 |
P90 years forever!
Aug 2002
Yeehaw, FL
53·149 Posts |
![]()
I'm trying to get the following code to run (required for allocating large pages in Vista):
{ LPVOID p; // Grant large page access HANDLE hToken; OpenProcessToken( GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken ); LUID luid; LookupPrivilegeValue( NULL, "SeLockMemoryPrivilege", &luid ); TOKEN_PRIVILEGES tp; tp.PrivilegeCount = 1; tp.Privileges[0].Luid = luid; tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; AdjustTokenPrivileges( hToken, FALSE, &tp, sizeof(TOKEN_PRIVILEGES), (PTOKEN_PRIVILEGES)NULL, (PDWORD)NULL ); x = GetLastError (); Alas, x is 1300. After hours of googling, it seems MS has eliminated editing of Local Security Policies in Vista Home. Thanks, MS. I found a utility that calls ntrights.exe that should have given me the SeLockMemoryPrivilege, but I still get error 1300. This is very depressing. Even if I can allocate large memory pages and get a performance boost, only a handful of users will be able to benefit. Few will be willing to tamper with security settings to allow large pages. Furthermore, since large memory pages are not swapped out, prime95 would impact performance when a machine is low on memory. Anyway, does anyone know how I can get the code above to work or how I can change my security policies so that the code above works? Last fiddled with by Prime95 on 2009-04-02 at 14:42 |
![]() |
![]() |
![]() |
#2 |
∂2ω=0
Sep 2002
República de California
5·2,347 Posts |
![]()
Hi, George:
I can't help you with getting-this-to-run-under-Vista, but am curious as to how much of a performance boost you get from large-paging for the 32-bit code. |
![]() |
![]() |
![]() |
#3 |
Jun 2005
USA, IL
C116 Posts |
![]()
User Account Control (UAC) in Vista tells the PC that you don't have access to run code that requires administrative access even if you're user ID is listed as an administrator (which is considered a filtered administrator). By default, both the local 'administrator' and 'domain/administrator' accounts are disabled. Have you enabled either of those and are logged in as one of them (or can you attempt to run your program as one of them)?
|
![]() |
![]() |
![]() |
#4 |
P90 years forever!
Aug 2002
Yeehaw, FL
53×149 Posts |
![]()
Cool, after rebooting (to install this weeks latest security updates) the code above is now working. I successfully allocated a 2MB page.
Now I can test whether 2MB pages have a significant impact on performance. Although, I'm doubtful I can ever make this part of a real release. It is way too hard to get privileges right, and locking down large swaths of memory might be considered bad form. |
![]() |
![]() |
![]() |
#5 |
"Richard B. Woods"
Aug 2002
Wisconsin USA
22×3×641 Posts |
![]() |
![]() |
![]() |
![]() |
#6 |
Jun 2003
32×17 Posts |
![]()
I agree with cheesehead. If 2 MB pages make a noticeable performance difference, those of us with dedicated Prime95 PCs would certainly use a "special" Prime95 version on their dedicated PCs. Especially if it came with a Windows XP/Vista how to set up permissions "cookbook". This idea sounds very promising as I know that AMD has hardware support for 2 MB pages on their 64 bit CPUs.
Last fiddled with by RMAC9.5 on 2009-04-03 at 05:44 |
![]() |
![]() |
![]() |
#7 |
P90 years forever!
Aug 2002
Yeehaw, FL
53×149 Posts |
![]() |
![]() |
![]() |
![]() |
#8 |
P90 years forever!
Aug 2002
Yeehaw, FL
53×149 Posts |
![]()
I'm having trouble timing this - probably due to Vista running under VMware. Best I can tell is large pages don't help. Of course, I didn't modify the FFT code to yank out the TLB priming that should be unnecessary with large pages. Maybe someday I'll move Vista over to a stand-alone computer. In the meantime, I'll leave the code in prime95 so that y'all can run your own benchmarks in 25.10.
Last fiddled with by Prime95 on 2009-04-04 at 19:32 |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tax the rich, land and privileges, then nothing else | jasong | Soap Box | 15 | 2013-01-06 20:59 |
Vista vs. XP for LL | Rodrigo | Software | 57 | 2012-06-17 05:50 |
Vista + Windows Defender = No Prime95? | Xyzzy | Software | 2 | 2008-07-12 07:03 |
Saving Progress on windows vista? | julian_emilio | Software | 1 | 2007-03-30 17:17 |
Prime95 on Windows Vista | Kaboom | Software | 10 | 2007-03-13 03:42 |