Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
THE GLOBALALLOC FUNCTION was once the center of Windows memory allocation. Everything came from GlobalAlloc, be it code or data, private application data, or shared clipboard data. In this chapter, we follow the history of this function (as well as its close friend GlobalLock) from its salad days as the king of the heap to its current position of faded glory in Win32. And as you’ll see, many of the strange requirements regarding the use of memory allocated on the global heap date back to the days when the global heap behaved very differently from how it does today.