How to increase the size of ram disk to 8 GB

xxxxx@yahoo.com wrote:

I was using the below code to increase the size of ram disk. this is the code that i got from this website. could any one please tell me how could i increase more than 1 GB. As below you will see somewhere this line:RtlZeroMemory (devExt->DiskImage, devExt->DiskRegInfo.DiskSize=32*1024*1024); When i intended to do this it turn out to give 64 MB. Could anyone please tell me how to inrease more than 1 GB. I was trying a lot but i couldnot figure out.

You have many months of work ahead of you to make this happen. First,
you have to be able to identify where the memory is really being
allocated. Hint: RtlZeroMemory doesn’t allocate memory.

Next, you need to understand (as others have told you) that allocating
more than a gigabyte cannot be done with the standard APIs. You will
have to use memory extensions to get more memory than that. It’s not
trivial. You will have to do the memory management yourself. In
particular, an x86 processor only has 4GB of virtual address space at
any given time. To get 8GB, you will have to map sections in and out as
you need them. That’s a big job with lots of opportunities for error,
and based on your posts you aren’t anywhere near prepared to deal with that.

Next, this defines a FAT16 file system, and a FAT16 partition is limited
to 4GB. Could it be converted to FAT32? Sure, but it won’t be easy.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

2GB. I had to look this one up:

http://support.microsoft.com/kb/118335

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Monday, July 30, 2007 14:35
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB

I haven’t followed this thread for a while, but isn’t FAT16 limited to
2GB? If so, 8GB won’t be happening.

IIRC FAT16 and FAT32 are both limited to 4GB per file. For FAT32, this
is 100%
sure.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com


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

Sorry Don burn
here is the source code for PNP.c, Can you please tell me how to map the memory allocation. Please can you help me a little bit.
//
// Allocate the memory for disk image.
//

devExt->DiskImage = ExAllocatePoolWithTag(
NonPagedPool,
devExt->DiskRegInfo.DiskSize,
RAMDISK_TAG_DISK);

if ( devExt->DiskImage == NULL )
{
DBGPRINT( DBG_COMP_INIT, DBG_LEVEL_ERROR, (“Can’t allocate memory for disk image\n”) );
RamDiskCleanUp( functionDeviceObject );
return STATUS_INSUFFICIENT_RESOURCES;
}

// Format the disk

RamDiskFormatDisk( functionDeviceObject );

In practice, FAT32 is fine with 4GB files. I did this lots of times,
capturing the movies from miniDV tape by MS Movie Maker.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

“Martin O’Brien” wrote in message
news:xxxxx@ntdev…
2GB. I had to look this one up:

http://support.microsoft.com/kb/118335

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Monday, July 30, 2007 14:35
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB

>I haven’t followed this thread for a while, but isn’t FAT16 limited to
>2GB? If so, 8GB won’t be happening.

IIRC FAT16 and FAT32 are both limited to 4GB per file. For FAT32, this
is 100%
sure.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com


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

Martin O’Brien wrote:

  1. As Tim possibly among others has pointed out a few times, the code
    to map pages in and out is quite a bit of work and really not all that
    simple.

“Not all that simple” is basically an understatement - you have to map
everything yourself and keep the integrity of the OS intact. Would be
difficult enough doing this e.g. for an open-source OS, IMHO it is
extremely difficult for a complex proprietary system like Windows.

  1. Do you really need such a large RAM disk that badly? Given you
    apparent experience level, you have months of work for something that is
    hard to imagine as vital.

Yes, the OP does need the 8GB RAM disk that badly:

xxxxx@yahoo.com wrote:
> Please, Please I need help for the final graduation
> project.

It might be that this task was given as a graduation project exactly
because it is challenging.

OTOH during my my study time it was perfectly acceptable not to do
something, iff you could present an unbroken chain of proof that it is
not possible/viable in the allocated time.
It’s the research that counts, after all, not the final result (unless
it’s part of a bigger project, of course).

(The only time our professors/assistants got really upset is when
someone did nothing on their assignments for 90% of the allocated time
and then tried to slap the project together within the last couple of
weeks. But I like to hope that this is not the case here… :wink: )

> Yes, the OP does need the 8GB RAM disk that badly:

If the OP can manage 4 GB , the 8 GB will not be a problem as well. Problem is that he will be able to use his ramdisk as RAW only
since he need then to format it to NTFS which is highly protected by MS. The description of the FAT32 is rather findable on the
internet , so , for a 4GB disk , it will not be problem.

“Not all that simple” is basically an understatement - you have to map everything yourself and keep the integrity of the OS
intact. Would be

It might be that this task was given as a graduation project exactly because it is challenging.

If he succeeds , it’s a proof of his skills and he deserves his graduate … :slight_smile: .

Chrisitaan

----- Original Message -----
From: “Hagen Patzke”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Tuesday, July 31, 2007 9:46 AM
Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB

> Martin O’Brien wrote:
>> 2. As Tim possibly among others has pointed out a few times, the code
>> to map pages in and out is quite a bit of work and really not all that
>> simple.
>
> “Not all that simple” is basically an understatement - you have to map everything yourself and keep the integrity of the OS
> intact. Would be difficult enough doing this e.g. for an open-source OS, IMHO it is extremely difficult for a complex proprietary
> system like Windows.
>
>> 3. Do you really need such a large RAM disk that badly? Given you
>> apparent experience level, you have months of work for something that is
>> hard to imagine as vital.
>
> Yes, the OP does need the 8GB RAM disk that badly:
>
> xxxxx@yahoo.com wrote:
> > Please, Please I need help for the final graduation project.
>
>
> It might be that this task was given as a graduation project exactly because it is challenging.
>
> OTOH during my my study time it was perfectly acceptable not to do something, iff you could present an unbroken chain of proof
> that it is not possible/viable in the allocated time.
> It’s the research that counts, after all, not the final result (unless it’s part of a bigger project, of course).
>
> (The only time our professors/assistants got really upset is when someone did nothing on their assignments for 90% of the
> allocated time and then tried to slap the project together within the last couple of weeks. But I like to hope that this is not
> the case here… :wink: )
>
> —
> 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

“Hagen Patzke” wrote in message news:xxxxx@ntdev…
>
> “Not all that simple” is basically an understatement - you have to map
> everything yourself and keep the integrity of the OS intact. Would be
> difficult enough doing this e.g. for an open-source OS, IMHO it is
> extremely difficult for a complex proprietary system like Windows.
>
Sorry but you are overstating this by a large amount. It is a complex
project for the skill level of the OP, who keeps asking the same question
and not accepting the answers. It is not that complex a project for people
with a solid knowledge of the basics.

I did a memory allocation package that did not allocate from the kernel
pools for a firm back in the NT 4.0 days in a matter of a few weeks. A
couple years after that I worked for a firm that was mainly open source
which needed something similar, their experts were amazed I have done
Windows in a few weeks, it took them a few months for similar
functionality.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

hello everyone,
In PNP.c, i tried to use the below code
PUCHAR alloc;
alloc = ExAllocatePoolWithTag(
NonPagedPool,
devExt->DiskRegInfo.DiskSize,
RAMDISK_TAG_DISK);

if (alloc == NULL )
{
DBGPRINT( DBG_COMP_INIT, DBG_LEVEL_ERROR, (“Can’t allocate memory for disk image\n”) );
RamDiskCleanUp( functionDeviceObject );
return STATUS_INSUFFICIENT_RESOURCES;
}

RtlCopyMemory( devExt->DiskImage, &alloc, devExt->DiskRegInfo.DiskSize );

Can you tell me what is wrong with this

Because NonPagedPool is 128MB total on 32-bit systems, and a little larger
but not a lot on 64-bit systems. This will change in the future but right
now, you are limited to significantly less than the size of the pool.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

wrote in message news:xxxxx@ntdev…
> hello everyone,
> In PNP.c, i tried to use the below code
> PUCHAR alloc;
> alloc = ExAllocatePoolWithTag(
> NonPagedPool,
> devExt->DiskRegInfo.DiskSize,
> RAMDISK_TAG_DISK);
>
>
> if (alloc == NULL )
> {
> DBGPRINT( DBG_COMP_INIT, DBG_LEVEL_ERROR, (“Can’t allocate memory
> for disk image\n”) );
> RamDiskCleanUp( functionDeviceObject );
> return STATUS_INSUFFICIENT_RESOURCES;
> }
>
> RtlCopyMemory( devExt->DiskImage, &alloc,
> devExt->DiskRegInfo.DiskSize );
>
> Can you tell me what is wrong with this
>

Can we please NOT post chunks of copyrighted source code to the list (Microsoft’s or others)???

Not only does it add absolutely nothing to the discussion (like, who’s gonna read it in MAIL?), it might be considered redistribution (though I DO NOT concede that it is) – and if it is, it’s probably also not allowed by the WDK EULA (at least it WASN’T allowed by the WDK EULA when I last checked, several months ago).

I’ve already had one polite request from a friendly 'Softie to remove the posted source from the archives.

If you have long sections of WDK samples like this, please just REFER folks to them… we all have the WDK installed.

Peter
OSR

File system just uses 32-bit values w/o their interpretation. It’s up to OS
how to treat them - signed Vs. unsigned.
So the same volume mounted with dual boot machine may work with the Windows
XP and fail to work with Linux. For example.

-a

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Tuesday, July 31, 2007 10:08 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB

In practice, FAT32 is fine with 4GB files. I did this lots of times,
capturing the movies from miniDV tape by MS Movie Maker.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

“Martin O’Brien” wrote in message
news:xxxxx@ntdev…
2GB. I had to look this one up:

http://support.microsoft.com/kb/118335

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Monday, July 30, 2007 14:35
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB

>I haven’t followed this thread for a while, but isn’t FAT16 limited to
>2GB? If so, 8GB won’t be happening.

IIRC FAT16 and FAT32 are both limited to 4GB per file. For FAT32, this
is 100%
sure.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com


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

I don’t think Linux is that stupid :slight_smile:

So:

  • FAT16 has a volume size limit of 2GB
  • FAT32 has a file size limit of 4GB, while the volume size can be 100GB -
    though the usual Windows formatting tool will reject such formatting.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

“Anton A. Kolomyeytsev” wrote in message
news:xxxxx@ntdev…
> File system just uses 32-bit values w/o their interpretation. It’s up to OS
> how to treat them - signed Vs. unsigned.
> So the same volume mounted with dual boot machine may work with the Windows
> XP and fail to work with Linux. For example.
>
> -a
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
> Sent: Tuesday, July 31, 2007 10:08 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB
>
> In practice, FAT32 is fine with 4GB files. I did this lots of times,
> capturing the movies from miniDV tape by MS Movie Maker.
>
> –
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> “Martin O’Brien” wrote in message
> news:xxxxx@ntdev…
> 2GB. I had to look this one up:
>
> http://support.microsoft.com/kb/118335
>
>
> mm
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
> Shatskih
> Sent: Monday, July 30, 2007 14:35
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB
>
> >I haven’t followed this thread for a while, but isn’t FAT16 limited to
> >2GB? If so, 8GB won’t be happening.
>
> IIRC FAT16 and FAT32 are both limited to 4GB per file. For FAT32, this
> is 100%
> sure.
>
> –
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> 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
>
>

I have volumes of 500GB formatted in FAT32. They work fine even if it isn’t
as efficient as NTFS, but it works. FAT questions can all be answered by
referring to fatgen103.doc and the FastFat driver sources in the WDK.


David J. Craig
Engineer, Sr. Staff Software Systems
Broadcom Corporation

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
> I don’t think Linux is that stupid :slight_smile:
>
> So:
> - FAT16 has a volume size limit of 2GB
> - FAT32 has a file size limit of 4GB, while the volume size can be
> 100GB -
> though the usual Windows formatting tool will reject such formatting.
>
> –
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> “Anton A. Kolomyeytsev” wrote in message
> news:xxxxx@ntdev…
>> File system just uses 32-bit values w/o their interpretation. It’s up to
>> OS
>> how to treat them - signed Vs. unsigned.
>> So the same volume mounted with dual boot machine may work with the
>> Windows
>> XP and fail to work with Linux. For example.
>>
>> -a
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
>> Sent: Tuesday, July 31, 2007 10:08 AM
>> To: Windows System Software Devs Interest List
>> Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB
>>
>> In practice, FAT32 is fine with 4GB files. I did this lots of times,
>> capturing the movies from miniDV tape by MS Movie Maker.
>>
>> –
>> Maxim Shatskih, Windows DDK MVP
>> StorageCraft Corporation
>> xxxxx@storagecraft.com
>> http://www.storagecraft.com
>>
>> “Martin O’Brien” wrote in message
>> news:xxxxx@ntdev…
>> 2GB. I had to look this one up:
>>
>> http://support.microsoft.com/kb/118335
>>
>>
>> mm
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
>> Shatskih
>> Sent: Monday, July 30, 2007 14:35
>> To: Windows System Software Devs Interest List
>> Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB
>>
>> >I haven’t followed this thread for a while, but isn’t FAT16 limited to
>> >2GB? If so, 8GB won’t be happening.
>>
>> IIRC FAT16 and FAT32 are both limited to 4GB per file. For FAT32, this
>> is 100%
>> sure.
>>
>> –
>> Maxim Shatskih, Windows DDK MVP
>> StorageCraft Corporation
>> xxxxx@storagecraft.com
>> http://www.storagecraft.com
>>
>>
>> —
>> 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
>>
>>
>
>

I think I caused this confusion. Maxim, you were right in the first
place - FAT16 supports 4GB. As Tim pointed out, FAT16 is limited to 2GB
only on 16 bit systems; on XP/Vista/et. c., it supports up to 4GB. I
just googled and hit the first Microsoft document, missing that it said
MS DOS.

Sorry about that.

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Tuesday, July 31, 2007 15:12
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB

I don’t think Linux is that stupid :slight_smile:

So:

  • FAT16 has a volume size limit of 2GB
  • FAT32 has a file size limit of 4GB, while the volume size can be
    100GB -
    though the usual Windows formatting tool will reject such formatting.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

“Anton A. Kolomyeytsev” wrote in message
news:xxxxx@ntdev…
> File system just uses 32-bit values w/o their interpretation. It’s up
to OS
> how to treat them - signed Vs. unsigned.
> So the same volume mounted with dual boot machine may work with the
Windows
> XP and fail to work with Linux. For example.
>
> -a
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
> Sent: Tuesday, July 31, 2007 10:08 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB
>
> In practice, FAT32 is fine with 4GB files. I did this lots of
times,
> capturing the movies from miniDV tape by MS Movie Maker.
>
> –
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> “Martin O’Brien” wrote in message
> news:xxxxx@ntdev…
> 2GB. I had to look this one up:
>
> http://support.microsoft.com/kb/118335
>
>
> mm
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
> Shatskih
> Sent: Monday, July 30, 2007 14:35
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB
>
> >I haven’t followed this thread for a while, but isn’t FAT16 limited
to
> >2GB? If so, 8GB won’t be happening.
>
> IIRC FAT16 and FAT32 are both limited to 4GB per file. For FAT32, this
> is 100%
> sure.
>
> –
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> 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

Hello to all,
as i am compiling the source code of ramdisk in the visual studio 2005. Is there any other way to debug the source code just to check each and every step of the source code.
I have to reboot again and again to check only the space of the ram disk. Is there any other way to debug the source code. So, that i can find the mistake and every thing.

Martin O’Brien wrote: I think I caused this confusion. Maxim, you were right in the first
place - FAT16 supports 4GB. As Tim pointed out, FAT16 is limited to 2GB
only on 16 bit systems; on XP/Vista/et. c., it supports up to 4GB. I
just googled and hit the first Microsoft document, missing that it said
MS DOS.

Sorry about that.

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Tuesday, July 31, 2007 15:12
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB

I don’t think Linux is that stupid :slight_smile:

So:
- FAT16 has a volume size limit of 2GB
- FAT32 has a file size limit of 4GB, while the volume size can be
100GB -
though the usual Windows formatting tool will reject such formatting.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

“Anton A. Kolomyeytsev” wrote in message
news:xxxxx@ntdev…
> File system just uses 32-bit values w/o their interpretation. It’s up
to OS
> how to treat them - signed Vs. unsigned.
> So the same volume mounted with dual boot machine may work with the
Windows
> XP and fail to work with Linux. For example.
>
> -a
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
> Sent: Tuesday, July 31, 2007 10:08 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB
>
> In practice, FAT32 is fine with 4GB files. I did this lots of
times,
> capturing the movies from miniDV tape by MS Movie Maker.
>
> –
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> “Martin O’Brien” wrote in message
> news:xxxxx@ntdev…
> 2GB. I had to look this one up:
>
> http://support.microsoft.com/kb/118335
>
>
> mm
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
> Shatskih
> Sent: Monday, July 30, 2007 14:35
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB
>
> >I haven’t followed this thread for a while, but isn’t FAT16 limited
to
> >2GB? If so, 8GB won’t be happening.
>
> IIRC FAT16 and FAT32 are both limited to 4GB per file. For FAT32, this
> is 100%
> sure.
>
> –
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> 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


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

---------------------------------
Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.

xxxxx@yahoo.com wrote:

hello everyone,
In PNP.c, i tried to use the below code
PUCHAR alloc;
alloc = ExAllocatePoolWithTag(
NonPagedPool,
devExt->DiskRegInfo.DiskSize,
RAMDISK_TAG_DISK);

if (alloc == NULL )
{
DBGPRINT( DBG_COMP_INIT, DBG_LEVEL_ERROR, (“Can’t allocate memory for disk image\n”) );
RamDiskCleanUp( functionDeviceObject );
return STATUS_INSUFFICIENT_RESOURCES;
}

RtlCopyMemory( devExt->DiskImage, &alloc, devExt->DiskRegInfo.DiskSize );

Can you tell me what is wrong with this

Besides the non-paged pool issue that Don pointed out, and which several
other people have pointed out as well, you have also made a mistake with
the RtlCopyMemory call. “alloc” is a 4-byte variable that contains an
address. And yet, you are trying to copy 64 megabytes from that 4-byte
variable into a pointer that is probably uninitialized. I’m almost
certain that what you wanted here was to save the address of the newly
allocated space:

devExt->DiskImage = alloc;

And the fact that you didn’t know this tells me quite clearly that you
do not have enough C expertise to even consider the kind of driver
project you have described. You need to choose a different senior project.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Maxim S. Shatskih wrote:

I don’t think Linux is that stupid :slight_smile:

So:

  • FAT16 has a volume size limit of 2GB

…on the 16-bit systems (95/98/ME). The NT-based systems can handle
4GB FAT16 partitions.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Not really. The closest thing I can think of to that would be to use a
VMWare snapshot, but that really doesn’t seem worth the effort/cost to
me for this. On that note, it sounds like you are not using WinDbg. If
that is the case, you desperately need to do so, and while the learning
curve sucks, everything else is a complete waste of time until you at
least get a reasonable working knowledge of it.

mm


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of ganesh kumar
gurung
Sent: Tuesday, July 31, 2007 17:23
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to increase the size of ram disk to 8 GB

Hello to all,
as i am compiling the source code of ramdisk in the
visual studio 2005. Is there any other way to debug the source code just
to check each and every step of the source code.
I have to reboot again and again to check only the space
of the ram disk. Is there any other way to debug the source code. So,
that i can find the mistake and every thing.

Martin O’Brien wrote:

I think I caused this confusion. Maxim, you were right in the first
place - FAT16 supports 4GB. As Tim pointed out, FAT16 is limited to 2GB
only on 16 bit systems; on XP/Vista/et. c., it supports up to 4GB. I
just googled and hit the first Microsoft document, missing that it said
MS DOS.

Sorry about that.

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Tuesday, July 31, 2007 15:12
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB

I don’t think Linux is that stupid :slight_smile:

So:
- FAT16 has a volume size limit of 2GB
- FAT32 has a file size limit of 4GB, while the volume size can be
100GB -
though the usual Windows formatting tool will reject such formatting.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

“Anton A. Kolomyeytsev” wrote in message
news:xxxxx@ntdev…
> File system just uses 32-bit values w/o their interpretation. It’s up
to OS
> how to treat them - signed Vs. unsigned.
> So the same volume mounted with dual boot machine may work with the
Windows
> XP and fail to work with Linux. For example.
>
> -a
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
> Sent: Tuesday, July 31, 2007 10:08 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB
>
> In practice, FAT32 is fine with 4GB files. I did this lots of
times,
> capturing the movies from miniDV tape by MS Movie Maker.
>
> –
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> “Martin O’Brien” wrote in message
> news:xxxxx@ntdev…
> 2GB. I had to look this one up:
>
> http://support.microsoft.com/kb/118335
>
>
> mm
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
> Shatskih
> Sent: Monday, July 30, 2007 14:35
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] How to increase the size of ram disk to 8 GB
>
> >I haven’t followed this thread for a while, but isn’t FAT16 limited
to
> >2GB? If so, 8GB won’t be happening.
>
> IIRC FAT16 and FAT32 are both limited to 4GB per file. For FAT32, this
> is 100%
> sure.
>
> –
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> 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


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

________________________________

Choose the right car based on your needs. Check out Yahoo! Autos new Car
Finder tool.
http:=X3oDMTE3NWsyMDd2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDY2FyLWZpbmRlcg-
-%20> — 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</http:>

ganesh kumar gurung wrote:

Hello to all,
as i am compiling the source code of ramdisk in the
visual studio 2005. Is there any other way to debug the source code
just to check each and every step of the source code.
I have to reboot again and again to check only the space
of the ram disk. Is there any other way to debug the source code. So,
that i can find the mistake and every thing.

You should be compiling with the DDK using the “build” tool, and
debugging using “windbg”. That way, you can single-step through the
code and watch the values change.

However, Ganesh, the mistake is in your plan. You CANNOT allocate more
than about 64 megabytes from non-paged pool in Windows. It is
impossible. Windows will not allow it. That path is a dead end, and
you are wasting both YOUR time and OUR time by continuing to try. It is
NEVER going to work.

IF you really want to modify the RAM disk sample to handle much larger
sizes, you will have to REWRITE the RAM disk sample, not just tweak a
couple of lines. You will have to use some very sophisticated
memory-management techniques. You will have to use the physical address
extensions (PAE). You will be managing memory that Windows does not
know about, as if it was your own private resource. It’s several months
of highly technical work.

Do you understand this?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Wait, how sure are you about this ? Did you check out memory limits for
Windows releases:
http://msdn2.microsoft.com/en-US/library/aa366778.aspx

For Vista it says: Non paged pool, Limited only by kernel mode virtual
address space and physical memory, starting with Windows Vista, 40% of RAM
up to a maximum of 128 GB. And LH 2008 even 75% of RAM. So if he sticks in
20GB or more, he should be fine right ?

/Daniel

“Tim Roberts” wrote in message news:xxxxx@ntdev…
> However, Ganesh, the mistake is in your plan. You CANNOT allocate more
> than about 64 megabytes from non-paged pool in Windows. It is
> impossible. Windows will not allow it. That path is a dead end, and
> you are wasting both YOUR time and OUR time by continuing to try. It is
> NEVER going to work.
>