How to recognise the ram drive more than 2G?

  • Thread starter Thread starter Vic.Dong
  • Start date Start date
V

Vic.Dong

Hi:
I make a ram drive more than 2G with FAT32 on win2k system, it can recognise
ram drive by installed driver with checked version, but installed driver
with free version, system did not recognise ram drive.
I find that one ctrl command not to be handled, but I do not understand what
means --"0x2D0C14", and I found nothing in 2k DDk.


Thanks
Vic
 
I don't know why a debug version would work but a release version wouldn't
(I would expect both to fail for 2GB), but I suspect the issue is with the
allocation size and the amount of PagedPool available to the driver (I am
assuming that you are allocating off of PagedPool). I think that the
allocation for the drive is failing.

For Win2k the maximum PagedPoolSize is ~500MB.

My WinXP-SP1 machine defaults to ~167MB (1GB RAM installed).

You can see the maximum by using WinDBG (or LiveKd) and doing:

dd mmsizeofpagedpoolinbytes l1 <enter>

lkd> dd mmsizeofpagedpoolinbytes l1
80539a80 0a000000
lkd> ? 0a000000
Evaluate expression: 167772160 = 0a000000


For more information see Inside Windows 2000 CH7 (Memory Management)

Pat
 
Thanks!
I find that IO ctrl command in WinXP SP1 DDK that is
IOCTL_STORAGE_GET_HOTPLUG_INFO command code, but it is same to not recognise
ram drive of more than 2G after I handled this IO control command code.
My ram drive memory allocation issue is called through allocating physical
memory for MDL and mapping that MDL to virtual address
(MmAllocatePagesForMdl and MmMapLockedPagesSpecifyCache). During creating
ram drive, it is successful to allocate physical memory, and fill in FAT32
format info, but finally windows donot recognise this ram drive when
installed free version driver, but checked version driver can recognise.


Vic
 
It sounds like a build problem (in other words, perhaps a #define problem or
perhaps a linking issue). The OS doesn't 'know' if a bit of code is debug
or release. The debug builds put their own extra instructions (for tracing,
etc.) that leverage OS services, but the OS (unless running under
'verifier') doesn't treat it any differently.

Suggestions:
1) Double check the .lib path and make sure it is the same for Release and
Debug
2) Debug and dumping out your structures to verify they are what you think
they are (in other words, compare the values in a debug vs. release mode).

Pat
 
Back
Top