Large memory reporting
Dmitry Timoshkov
dmitry at codeweavers.com
Sun Aug 15 05:17:02 CDT 2004
"Shachar Shemesh" <wine-devel at shemesh.biz> wrote:
> If so, is there a way for me, when at the heap.c code, to know whether
> that flag was set on loading the current process?
(copied from dlls/ntdll/loader.c):
PEB *peb = NtCurrentTeb()->Peb;
IMAGE_NT_HEADERS *nt = RtlImageNtHeader( peb->ImageBaseAddress );
if (nt->FileHeader.Characteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE)
{
return full_address_range_of_the_application;
}
else
return 2Gb_of_adderess_space;
or even better reimplement GlobalMemoryStatus via VirtualQuery and
leave all system dependent code to ntdll.NtQueryVirtualMemory.
--
Dmitry.
More information about the wine-devel
mailing list