curious case of 20GB address space reservation

.reload /f kernel32.dll
bp kernel32!VirtualAlloc ".if (@rdx>0x100000) {r; KB 25} .else {gc}"
Below debugging information translates to:
VirtualAlloc(0x0000000200000000, 20GB, MEM_RESERVE, PAGE_NOACCESS)
VirtualAlloc(rcx, rdx, r8, r9)
----------------------------------------------------------------------

kernel32!VirtualAlloc:

00000000`776c5c68 ff25ba760800    jmp     qword ptr 
[kernel32!_imp_VirtualAlloc (00000000`7774d328)]
ds:00000000`7774d328={KERNELBASE!VirtualAlloc (000007fe`fd721900)}

ModLoad:000007fe`d1680000 000007fe`d23cc000 
C:\windows\system32\nvcuda.dll
ModLoad:000007fe`ec760000 000007fe`eca93000 
C:\windows\system32\nvapi64.dll

*** ERROR: Symbol file could not be found. 
Defaulted to export symbols for C:\windows\system32\nvcuda.dll -

rax=0000000700000000 rbx=0000000200000000 rcx=0000000200000000
rdx=0000000500000000 rsi=000000fff8000000 rdi=0000000500000000
rip=00000000776c5c68 rsp=000000000022c108 rbp=0000000100000000
r8=0000000000002000  r9=0000000000000001 r10=0000000000000000
r11=0000000000000246 r12=0000000000000000 r13=0000000000000002
r14=0000000100000000 r15=000000fff8000000

iopl=0         nv up ei ng nz na po cy
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             
efl=00000287

kernel32!VirtualAlloc:

00000000`776c5c68 ff25ba760800    jmp    
qword ptr [kernel32!_imp_VirtualAlloc (00000000`7774d328)]
ds:00000000`7774d328={KERNELBASE!VirtualAlloc (000007fe`fd721900)}

Child-SP          RetAddr           Call Site
00000000`0022c108 000007fe`d1ecd538 kernel32!VirtualAlloc
00000000`0022c110 000007fe`d16c7a33 nvcuda!cuProfilerStop+0x82fc18
00000000`0022c140 000007fe`d16c7c0d nvcuda!cuProfilerStop+0x2a113
00000000`0022c1a0 000007fe`d16c8595 nvcuda!cuProfilerStop+0x2a2ed
00000000`0022c1f0 000007fe`d169fc09 nvcuda!cuProfilerStop+0x2ac75
00000000`0022c230 000007fe`d169fd0a nvcuda!cuProfilerStop+0x22e9
00000000`0022c270 000007fe`d1681417 nvcuda!cuProfilerStop+0x23ea
00000000`0022c2a0 00000000`2e22337a nvcuda!cuInit+0x137

Reference links:

  • Memory Protection Constants (msdn.microsoft.com)
  • Debugging using Windbg : Symbols loading (windowstipspage.com)
  • Conditional breakpoints in WinDbg (msdn.microsoft.com)
  • Memory management under Windows (bugslasher.net)
  • Unpacking Dynamically Allocated Code (crowdstrike.com)
  • Debugging with the Right Tools (blogs.msdn.com)
  • Investigating Memory Issues (msdn.microsoft.com)