Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

StorPortAllocateContiguousMemorySpecifyCacheNode Always fails!!!

Muthazhagan_ArulbalasubramaniMuthazhagan_Arulbalasubramani Member - All Emails Posts: 27

I am trying to allocate 512MB of memory using StorPortAllocateContiguousMemorySpecifyCacheNode on Windows 7, but it always fails with insufficient memory error. Even though I have 16GB of RAM, out of which enough "Free Physical Memory" is available.

The strange part is on Windows 10, I am able to allocate 512MB with 16GB of RAM.

Any advice would be appreciated.

Note : it is a normal desktop PC not a server, It just has only one node.


  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,498

    Why do you need contiguous memory? It doesn't take very long for physical memory in a system to become quite fragmented, and it's not at all unusual that 512MB of contiguous space would not be available.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Muthazhagan_ArulbalasubramaniMuthazhagan_Arulbalasubramani Member - All Emails Posts: 27

    We are doing some experiment with our SSD. Host driver supposed to give large memory region to Device. So we are trying to allocate physically contiguous-Non paged memory.

    The whole experiment is also done on a fresh system after the system restart, so we had enough free Physical memory as per task manager. Since we didn't run any other applications so fragmentation would be ideally less we believe.

  • Don_BurnDon_Burn Member - All Emails Posts: 1,700

    It isn't just programs that fragment memory. In Windows 7 you still had a limited amount of kernel memory you could allocate, and the kernel would fragment quickly. I did this on a Windows 7 system for a custom driver (not a storport) but to be reliable, I had to make it one of the earliest drivers loaded, and immediately allocate the memory.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 15 Jun 2020 LIVE ONLINE
Writing WDF Drivers 22 June 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA