The ramdisk can go over 64M by editing the settings as described in:
http://support.microsoft.com/kb/67321/
For instance, for a ramdisk between 256 and 511 MB, you have to specify
"
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Ramdisk\Parameters]
“DiskSize”=dword:18000000
“SectorsPerCluster”=dword:00000010
"
This works properly on Vista 32 where the memory limits for NP Pool are not defined. In previous versions, the limit is 256 MB.
http://msdn.microsoft.com/en-us/library/aa366778(VS.85).aspx
You will also have to modify the sample by specifying the number of Huge Sectors inside the RamDiskFormatDisk() function:
if( devExt->DiskRegInfo.DiskSize/devExt->DiskGeometry.BytesPerSector < 65536 ) {
bootSector->bsSectors = (USHORT)(devExt->DiskRegInfo.DiskSize /
devExt->DiskGeometry.BytesPerSector);
} else {
bootSector->bsSectors = 0;
bootSector->bsHugeSectors = devExt->DiskRegInfo.DiskSize /
devExt->DiskGeometry.BytesPerSector;
}
bootSector->bsMedia = (UCHAR)devExt->DiskGeometry.MediaType;
— On Thu, 1/22/09, Ashraf wrote:
> From: Ashraf
> Subject: RE: RE:[ntdev] RamDisk questions
> To: “Windows System Software Devs Interest List”
> Date: Thursday, January 22, 2009, 12:39 PM
> Hi Holan,
> Thanks for your quick reply.
> Actually I mean that how can I increase the size of ramdisk
> more than 128 mb assuming that system memory is 4gb. There
> are some software that can do that like cenetak.
>
> It seems that I have to allocate memory from the paged pool
> instead of using
> non-paged memory.
>
> devExt->DiskImage = ExAllocatePoolWithTag(
> ???
> PagedPool,
> ???
> devExt->DiskRegInfo.DiskSize,
> ???
> RAMDISK_TAG_DISK);
> if(pDiskEx->DiskImage)
> {
> ? pDiskEx->DiskMDL = IoAllocateMdl(
> pDiskEx->DiskImage,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
> pDiskEx->Parameters.DiskSize,
> ???
> FALSE, FALSE, NULL);
> if(pDiskEx->DiskMDL)
> {
> ??? MmProbeAndLockPages(pDiskEx->DiskMDL,
> KernelMode,IoModifyAccess);
> }
>
> Problem is that IoAllocateMdl has limitation in size up to
> 64mb. Is there any alternativeway? How could I proceed?
>
> Thanks again.
>
>
> — On Wed, 1/21/09, Doron Holan
> wrote:
> From: Doron Holan
> Subject: RE: RE:[ntdev] RamDisk questions
> To: “Windows System Software Devs Interest List”
>
> Date: Wednesday, January 21, 2009, 10:11 PM
>
> On a 32 bit os a 4 gb ram disk backed by the same sized
> alloc is impossible
>
> d
>
> Sent from my phone with no t9, all spilling mistakes are
> not intentional.
>
> -----Original Message-----
> From: xxxxx@yahoo.com
> Sent: Wednesday, January 21, 2009 9:56 PM
> To: Windows System Software Devs Interest List
>
> Subject: RE:[ntdev] RamDisk questions
>
>
> I am working with Microsoft Windows 2000 sample ramdisk
> driver. The source has
> limitation in size of ramdisk. But I want to increase the
> size more than 128 mb
> up to 4gb. I’ve done so much googling but found no
> solution related with
> this.
> How could I proceed?
>
> Thanks in advance.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars
> visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online
> at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars
> visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online
> at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars
> visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online
> at http://www.osronline.com/page.cfm?name=ListServer