Diving into the Vista Heap
- Posted: Jun 21, 2006 at 3:19 PM
- 56,971 Views
- 20 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
We recently interviewed Adrian Marinescu, lead developer on the Windows Kernel team focusing on the Heap Manager and associated technologies. The Heap Manager plays a big role in shaping system performance and security. (Heap mechanisms have been targets
of several security attacks in the past by savvy, highly-skilled hackers.)
Vista promises to provide a heap management infrastructure that will be very hard for expert hackers to exploit and Adrian, the main developer of this system, explains how the heap has been improved in Vista and why it will help make Vista both more performant
and secure.
We've had Adrian on before when he worked on the Windows Object Manager.
Don't know what the Windows Heap is? Well, watch and learn.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
"The new heap infrastructure is more insurant that there won't be any hacking going on"
C
It's called the english language. It does evolve. No, the dictionaries are not representative of the language. It's the other way around. Soon performat WILL show up in the dictionaries.
Besides, how did "google" become a verb? Same deal. It's to get a point across in an active voice. Plus it's l33t. The last reason should be all that someone needs
Cheers.
Hello,
I live in Denmark and we have a list of proper Danish words, each year the list is evaluated and new words are added, some are even removed. So untill a word is on the list it is not a proper Danish word - even if it is used quite often.
The organisation that does this work is called "Dansk sprognævn" - "Danish Language Councel". I guess it is important for a small language like Danish.
Many of the latest additions to the list of proper Danish words are actually English words that we use as our own. I am pretty sure "performant" is not on the list.
Thanks Klaus Enevoldsen
It's true what you say about the language evolving, but you have to bear in mind that every new word (and some old ones) has a Coefficient of People Wanting To Punch You In the Face Every Time They Hear You Say It, lets call it Cpunch.
I'd suggest, from someone who is satisfied with the word "fast", that performant has a pretty high Cpunch.
Anyway that's off topic. Have Microsoft hired a few 'hackers' to have a good old punch at the heap?
I am thinking Cpunch has a higher Coefficient of People wanting to punch you.
Back on topic, I tried to make sense of some of the stuff at the end but it kind of went over my head. But I see they are doing the same thing as the rest of Vista where they add more layers and bringing stuff up closer to user mode. Pretty cool.
Cheers.
Agreed. Please stay on topic. There is some very interesting information in this video. I'm surprised nobody is talking about this stuff...
C
GN
PS why don't they just call the win32 heat API rather the implementing there own heep?
As far as I am aware these are implemented using the Windows API. I'm curious, though, as to how one would implement a heap without using OS provided functionality?
If you are aware of a specific implementation of new/delete that implements it's own heap I would like to take a look at it
Maybe like me people had to stop the video half way through because they couldn't understand a word Adrian was saying. I don't mean any disrespect, it's a consequence of having lots of nationalities working for your company.
Yeah unfortunatly this is the case for me.. I just couldn't understand it.
Thanks
Most implementation of new/delete malloc/free ask the OS for LARGE blocks of ram, (e.g. 32K at a time) then split it up into the small chunks that are given out. I know the Microsoft C++ runtime used to do with, as I have in the past had to look it's code in the debugger after a buffer overrun in the software I was working on. (On most OSs asking for memory is VERY expensive so a c/c++ program would be match too slow if the runtime pass the request onto the OS each time.)
As I work in C# these days I have not had to look at the Microsoft C++ runtime libs for a few years so don’t know if they now just call into the speed up OS heap functions.
Yep...
C
MicroSoft is falling farther behind. A machine of a new design is coming.
A software heap manager is not the answer. High performance Linux is moving to a hardare garbage collected paralell heap. (So applications can't deallocate and allocate faster than the heap is compacted.)
MicroSoft must make the multicore FPGA/ASIC a Vista.v2 feature so that kernel resources for memory and I/O firmware is updated as part of the OS. Learn something from the IBM mainframes so that specialized algorithms are off loaded to FPGA multicores. More than that the technology developed in the xBOX with an FPGA/GPU link to the 10MB eDram (NEC) is not followed up on.
Heap Management and garbage collection is a hardware resource. Google Boyle or pipelined hardware heap garbage collection. Programmable acceleration that is MS developed and specified is the only way to stay ahead on hardware Linux acceleration.
Vista OS-> loads eDram/ FPGA code instead of DLL's for a single core WINTEL machine.
What's deeply disturbing about this is that MicroSoft is "selling" Vista hardware logos. MS owes itself to develop (or reward) the platform makers for windows acceleration of it's OS.
Almost, but not quite. malloc/free or new/delete are C/C++ language specific memory allocation/de-allocation routines. They allow you to create chunks of memory for your own use - untyped blocks in the case of C's malloc or untyped/typed in C++'s new.
Windows itself provides a range of memory allocation routines which are called by various dev platforms etc. to allocate memory on device. This is necessary because in the world of modern OS', running apps do not get complete control over the whole machine and the OS must arbitrate between demands for blocks of memory and the availability of free RAM. When memory is demanded and it's not available, the OS will try to swap read-only data out of memory into a disk-based swap file and allocate some/all of the freed-up RAM to the requesting app.
Why do dev languages implement their own memory management infrastructure? Because asking the OS for memory is not a free operation - it costs time. It's often faster for a dev platform to ask the OS for a chunk of RAM (which can take some time) and then divide this chunk up much more quickly and easily (since it doesn't need to check ACL's, etc) using app-specific algorithms.
This is why memory-management tools like SmartHeap and later versions of VC++ could deliver magnificent perf improvements over the standard C RTL malloc.
In more modern languages and environments such as Java or CLR, memory is Garbage Collected and the app is generally not in control of its memory - that's left up to the execution engine (e.g. JVM/CLR). The execution engine can deliver massive performance benefits for memory allocation compared to simply call the OS' equivalent of Windows' GlobalAlloc() API.
What the CoreOS team at Microsoft have added is some insanely clever technology which will help deliver massive stability improvements by preventing code from executing in areas in which it's not permitted to - regardless of the toolset used to build the code. That's not to say that Vista's MM (Mmemory Manager) is flawless, but the bar for hackers has now been raised significantly.
Remove this comment
Remove this thread
close