[ros-kernel] NtQuerySection dubts
Mike Nordell
tamlin at algonet.se
Tue May 4 20:36:10 CEST 2004
Hartmut Birr provided a large part of the VirtualQuery problem a few days
ago, making it work for a particular kind of requests. However, there are
parts missing.
To make a long story short, the AllocationBase seems again wrong on ROS and
here's the source (to be added to regressions?). Comparing NT and ROS output
it's quite obvious. As I myself again isn't too familiar with the area...
#include <windows.h>
int main()
{
LPCVOID p = (LPCVOID)0x571100; // intentionally outside .exe
MEMORY_BASIC_INFORMATION mbi;
DWORD dwRet = VirtualQuery(p, &mbi, sizeof(mbi));
printf("dwRet = 0x%#x\n", dwRet);
printf("MEMORY_BASIC_INFORMATION {\n");
printf("BaseAddress : 0x%#x\n", mbi.BaseAddress);
printf("AllocationBase : 0x%#x\n", mbi.AllocationBase);
printf("AllocationProtect: 0x%#x\n", mbi.AllocationProtect);
printf("RegionSize : 0x%#x\n", mbi.RegionSize);
printf("State : 0x%#x\n", mbi.State);
printf("Protect : 0x%#x\n", mbi.Protect);
printf("Type : 0x%#x\n", mbi.Type);
return 0;
}
Output from NT5:
0x571000, 0, 0, 0x77a0f000, 0x10000, 1, 0
>From ROS:
0x571000, 0x51f000, 0x40, 0xbe000, 0x1000, 0x40, 0x20000
Can anyone verify these findings?
/Mike
More information about the Ros-kernel
mailing list