Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Windows 7 memory management changes

Reply
Thread Tools Display Modes

Windows 7 memory management changes

 
 
fuzzy_duck
Guest
Posts: n/a

 
      08-27-2009
It appears the memory management scheme of Windows 7 has changed. When using
the call MmAllocateContiguousMemorySpecifyCache(), less contiguous memory is
available.
With previous OS's, (i.e. NT, 2000, 2000 server, 2003 server, XP, Vista) I
have always been able to allocate 100MB. In Windows 7 I can usually get no
more than 16MB. To help my understanding of what to change to fix the
application, does anyone know what changed and why?

 
Reply With Quote
 
 
 
 
Don Burn
Guest
Posts: n/a

 
      08-27-2009
When are you trying to allocate it? At boot time I find Windows 7 allows
more contiguous memory than previous OS'es. But yes they made things more
agressive in memory management so you probably see smaller blocks sooner.


--
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply





"fuzzy_duck" <> wrote in message
news:C7CC9ED0-AD6D-4B13-8ADA-...
> It appears the memory management scheme of Windows 7 has changed. When
> using
> the call MmAllocateContiguousMemorySpecifyCache(), less contiguous memory
> is
> available.
> With previous OS's, (i.e. NT, 2000, 2000 server, 2003 server, XP, Vista) I
> have always been able to allocate 100MB. In Windows 7 I can usually get
> no
> more than 16MB. To help my understanding of what to change to fix the
> application, does anyone know what changed and why?
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4374 (20090827) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>




__________ Information from ESET NOD32 Antivirus, version of virus signature database 4374 (20090827) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




 
Reply With Quote
 
 
 
 
Pavel Lebedinsky [MSFT]
Guest
Posts: n/a

 
      08-28-2009
>> With previous OS's, (i.e. NT, 2000, 2000 server, 2003 server, XP, Vista)
>> I
>> have always been able to allocate 100MB. In Windows 7 I can usually get
>> no
>> more than 16MB. To help my understanding of what to change to fix the
>> application, does anyone know what changed and why?

>
> When are you trying to allocate it? At boot time I find Windows 7 allows
> more contiguous memory than previous OS'es. But yes they made things
> more agressive in memory management so you probably see smaller blocks
> sooner.


Also, how much RAM does the system have and what architecture is this?

Compared to Vista, the changes in win7 were mostly aimed at improving
performance of contiguous allocations, so it's a bit surprising that you see
such a big difference in the amount of memory that can be allocated.

--
Pavel Lebedinsky/Windows Kernel Test
This posting is provided "AS IS" with no warranties, and confers no rights.


 
Reply With Quote
 
fuzzy_duck
Guest
Posts: n/a

 
      08-28-2009
The memory is being allocated at boot time by a custom driver. The system
has 2G of RAM and is running Windows 7 32 bit(pre-release from MSDN). The
hardware is a Supermicro server class motherboard with dual Xeon 2GHz
processors with hyperthreading turned on. I also see this behavior in other
configurations which have more memory and in other motherboard models, some
with quad core processors.

"Pavel Lebedinsky [MSFT]" wrote:

> >> With previous OS's, (i.e. NT, 2000, 2000 server, 2003 server, XP, Vista)
> >> I
> >> have always been able to allocate 100MB. In Windows 7 I can usually get
> >> no
> >> more than 16MB. To help my understanding of what to change to fix the
> >> application, does anyone know what changed and why?

> >
> > When are you trying to allocate it? At boot time I find Windows 7 allows
> > more contiguous memory than previous OS'es. But yes they made things
> > more agressive in memory management so you probably see smaller blocks
> > sooner.

>
> Also, how much RAM does the system have and what architecture is this?
>
> Compared to Vista, the changes in win7 were mostly aimed at improving
> performance of contiguous allocations, so it's a bit surprising that you see
> such a big difference in the amount of memory that can be allocated.
>
> --
> Pavel Lebedinsky/Windows Kernel Test
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>

 
Reply With Quote
 
Pavel Lebedinsky [MSFT]
Guest
Posts: n/a

 
      08-29-2009
> The memory is being allocated at boot time by a custom driver. The system
> has 2G of RAM and is running Windows 7 32 bit(pre-release from MSDN). The
> hardware is a Supermicro server class motherboard with dual Xeon 2GHz
> processors with hyperthreading turned on. I also see this behavior in
> other
> configurations which have more memory and in other motherboard models,
> some
> with quad core processors.



One possibility is that for whatever reason (for example, due to improved
boot parallelism in win7), by the time your code runs the system now has
more outstanding allocations, making it more difficult to find contiguous
memory. It might be interesting to compare the output of !vm immediately
before the call to MmAllocateContiguousMemory on Vista SP1+ and Win7.

Why do you need such a big chunk of contiguous memory by the way?

--
Pavel Lebedinsky/Windows Kernel Test
This posting is provided "AS IS" with no warranties, and confers no rights.


 
Reply With Quote
 
Alexander Grigoriev
Guest
Posts: n/a

 
      08-29-2009
Are you by any chance calling the allocation on DISPATCH_LEVEL? Or before
pagefile stack is initialized?

"fuzzy_duck" <> wrote in message
news:167E1EA1-116B-4880-A149-...
> The memory is being allocated at boot time by a custom driver. The system
> has 2G of RAM and is running Windows 7 32 bit(pre-release from MSDN). The
> hardware is a Supermicro server class motherboard with dual Xeon 2GHz
> processors with hyperthreading turned on. I also see this behavior in
> other
> configurations which have more memory and in other motherboard models,
> some
> with quad core processors.
>
> "Pavel Lebedinsky [MSFT]" wrote:
>
>> >> With previous OS's, (i.e. NT, 2000, 2000 server, 2003 server, XP,
>> >> Vista)
>> >> I
>> >> have always been able to allocate 100MB. In Windows 7 I can usually
>> >> get
>> >> no
>> >> more than 16MB. To help my understanding of what to change to fix the
>> >> application, does anyone know what changed and why?
>> >
>> > When are you trying to allocate it? At boot time I find Windows 7
>> > allows
>> > more contiguous memory than previous OS'es. But yes they made things
>> > more agressive in memory management so you probably see smaller blocks
>> > sooner.

>>
>> Also, how much RAM does the system have and what architecture is this?
>>
>> Compared to Vista, the changes in win7 were mostly aimed at improving
>> performance of contiguous allocations, so it's a bit surprising that you
>> see
>> such a big difference in the amount of memory that can be allocated.
>>
>> --
>> Pavel Lebedinsky/Windows Kernel Test
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
My available memory is down to very little, yet my PF Usage is 8 gigabytes (about how much memory is on the box), sql server keeps having memory issues yet the sqlservr.exe is using hardly any memory.. how to fix this? is there some way to limit how Daniel Server Migration 2 08-30-2007 09:15 AM
My available memory is down to very little, yet my PF Usage is 8 gigabytes (about how much memory is on the box), sql server keeps having memory issues yet the sqlservr.exe is using hardly any memory.. how to fix this? is there some way to limit how Daniel Clustering 1 08-28-2007 05:04 PM
My available memory is down to very little, yet my PF Usage is 8 gigabytes (about how much memory is on the box), sql server keeps having memory issues yet the sqlservr.exe is using hardly any memory.. how to fix this? is there some way to limit how Daniel Active Directory 1 08-28-2007 01:50 PM
My available memory is down to very little, yet my PF Usage is 8 gigabytes (about how much memory is on the box), sql server keeps having memory issues yet the sqlservr.exe is using hardly any memory.. how to fix this? is there some way to limit how Daniel Windows Server 0 08-27-2007 11:39 PM
My available memory is down to very little, yet my PF Usage is 8 gigabytes (about how much memory is on the box), sql server keeps having memory issues yet the sqlservr.exe is using hardly any memory.. how to fix this? is there some way to limit how Daniel File Systems 0 08-27-2007 11:39 PM