Windows 7 memory management changes

Discussion in 'Windows Vista Drivers' started by fuzzy_duck, Aug 27, 2009.

  1. fuzzy_duck

    fuzzy_duck Guest

    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?
     
    fuzzy_duck, Aug 27, 2009
    #1
    1. Advertising

  2. fuzzy_duck

    Don Burn Guest

    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:...
    > 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
     
    Don Burn, Aug 27, 2009
    #2
    1. Advertising

  3. >> 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.
     
    Pavel Lebedinsky [MSFT], Aug 28, 2009
    #3
  4. fuzzy_duck

    fuzzy_duck Guest

    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.
    >
    >
    >
     
    fuzzy_duck, Aug 28, 2009
    #4
  5. > 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.
     
    Pavel Lebedinsky [MSFT], Aug 29, 2009
    #5
  6. Are you by any chance calling the allocation on DISPATCH_LEVEL? Or before
    pagefile stack is initialized?

    "fuzzy_duck" <> wrote in message
    news:...
    > 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.
    >>
    >>
    >>
     
    Alexander Grigoriev, Aug 29, 2009
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luke

    Computer Management --> Storage --> Disk Management

    Luke, Sep 25, 2007, in forum: Windows Vista Administration
    Replies:
    1
    Views:
    601
    SKeene
    Nov 5, 2007
  2. dave
    Replies:
    3
    Views:
    524
    Bruce Chambers
    Jun 30, 2007
  3. Chamber
    Replies:
    1
    Views:
    284
    Gary VanderMolen
    Jul 10, 2009
  4. Elohim

    Volume level changes when track position changes

    Elohim, Dec 30, 2004, in forum: Windows Media Player
    Replies:
    1
    Views:
    172
    Chris Lanier [MVP]
    Dec 31, 2004
  5. Robert Janik
    Replies:
    2
    Views:
    750
    Robert Janik
    Apr 21, 2010
Loading...

Share This Page