Tech Off Thread

2 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Memory allocation in diffferent os

Back to Forum: Tech Off
  • User profile image
    QuestionMan

    I think I lost my mind but I recall the somewhere between NT and 2003 the way memory was reallocated changed. Something thing like last freed was the first allocated to last freed was last allocated. Does this make sense and is it documented any where,,,

  • User profile image
    Mike Dimmick

    Windows NT 4.0 SP4 and Windows 2000 had a new heap manager implementation that implements lookaside free lists for fixed size blocks. This speeds up allocations for blocks close to these sizes. Very large blocks will incur a larger allocation cost. In this implementation, a block freed is pushed onto the appropriate free list; new allocations use the most recently freed block, which also improves cache locality, but can cause problems for buggy applications which try to use a block after it was freed.

    See Heap Manager Changes in Service Pack 4 and Windows 2000 for more details.

    IIRC there were some further changes to reduce processor contention for the heap on multiprocessor systems in Windows XP. It also has a Low Fragmentation Heap (also available as a hotfix for Windows 2000, suggesting it will be in SP5) although this must be turned on with HeapSetInformation.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.