Thank you all for the comments and ideas.
Here I comment back.
**********************
**** Mr. peterwie ****
**********************
Why do you need the memory to be virtually contiguous??
You could allocate in much smaller slabs and use a pretty
simple tree data structure to find your way through the various memory pages.?
The larger the slab you try to allocate, the more fragile your ramdisk driver will become.
MY COMMENT:
According to the documentation, MmAllocatePagesForMdl or MmAllocatePagesForMdlEx doesn't
allocate memory in contigous form, so my idea was to allocate the LARGE memory.
It is written as
"The physical memory pages returned by MmAllocatePagesForMdl
are typically not contiguous pages"
in Microsoft Learn: Build skills that open doors in your career
Are you meaning different thing by "virtually contiguous" ?
I couldn't get why "fragile". Could you please explain more about it ?
*************************
**** Mr. Tim Roberts ****
*************************
Why do you want to do this?
RAM drives are a fun toy, and they were useful in the "bad old days"
when we were working with floppy drives that worked at the speed of
snail, but they have very little practical use today.? Windows disk
caching produces a more useful speed boost, and doesn't require you to
think about a separate drive letter.
MY COMMENT:
Thanks for your comments...
"bad old days", nice phrase,
BUT...I think some popular commercial Ramdisk software are still living
in "bad old days", OR , may be the users like bad old days.
There are several reasons for us to make such drive.
A seperate drive is required in our SPEC, so we couldn't
change it.
********************
**** Mr Skywing ****
********************
Use multiple allocations?
MY COMMENTS
Sorry I couldn't get your point.
Basically I can create , for example 8 GB in Ram, with 4 GB each.
So even I use multiple application, I need to make 2 drives for 4GB each.
But I need only one drive with 8GB.
Do you have other thinking...?
Best Regards
-M
--- On Fri, 5/29/09, Peter Wieland wrote:
From: Peter Wieland
Subject: RE: Re:[ntdev] About MmAllocatePagesForMdl for allocating over then 4 GB
To: "Windows System Software Devs Interest List"
Date: Friday, May 29, 2009, 11:35 PM
Why do you need the memory to be virtually contiguous?? You could allocate in much smaller slabs and use a pretty simple tree data structure to find your way through the various memory pages.? The larger the slab you try to allocate, the more fragile your ramdisk driver will become. ?-p ?From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of James Rassel
Sent: Friday, May 29, 2009 3:26 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] About MmAllocatePagesForMdl for allocating over then 4 GB ?Dear Mr. Pavel,
Thank you for your reply.
Maximum MDL size is determined by the ByteCount field which is a ULONG.
So the largest size that can be allocated in a single call to
MmAllocatePagesForMdl
is (4 GB - PAGE_SIZE)
>> So I am confirm that, it is not possible to create over then 4 GB for a single call
using these functions. What about the Multiple call and uses the allocated memory
as a single RAM drive ? Is there any possibilities ? Like using some Array of MDL.
e.g, PMDL pMdl[10];
Sorry for asking some child-like questions, I don't have much experience on device driver,
but I really need to create over 4 GB RAM (e.x 10 GB, 20 GB etc) for a single RAM disk drive. If someone can give me some clue, I can study forward.
But still I can find any clue to solve my problem.
Anyway thanks again and looking forward for your advice.
BR
-Mostafa
--- On Fri, 5/29/09, Pavel Lebedinsky wrote:
From: Pavel Lebedinsky
Subject: Re:[ntdev] About MmAllocatePagesForMdl for allocating over then 4 GB
To: "Windows System Software Devs Interest List"
Date: Friday, May 29, 2009, 1:00 PM> Now my problem is: MmAllocatePagesForMdl or MmAllocatePagesForMdlEx
> function always giving 3.95 GB even I have 12 GB ram installed.
Maximum MDL size is determined by the ByteCount field which is a ULONG.
So the largest size that can be allocated in a single call to
MmAllocatePagesForMdl
is (4 GB - PAGE_SIZE).
Note that even much smaller allocations can fail in practice, even if the
total
amount of RAM is greater than 4 GB. Typically, MmAllocatePagesForMdlEx
can only allocate as much as the amount of available pages in the system
(Memory\Available Bytes counter in perfmon or "Available" memory
in task manager).
--
Pavel Lebedinsky/Windows Kernel Test
This posting is provided "AS IS" with no warranties, and confers no rights.
---
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
OSR Seminars – OSR
To unsubscribe, visit the List Server section of OSR Online at ListServer/Forum
--- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: OSR Seminars – OSR To unsubscribe, visit the List Server section of OSR Online at ListServer/Forum
---
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
OSR Seminars – OSR
To unsubscribe, visit the List Server section of OSR Online at ListServer/Forum