History reference:
https://stackoverflow.com/questions/34326835/localalloc-vs-globalalloc-vs-malloc-vs-new translation: http://www.transl-gunsmoker.ru/2009/10/localalloc-globalalloc.html
In short, in bearded times there was a segmental memory, global and local heaps, selectors and near and far pointers. Then (with the release of Win 9x, and later NT) switched to a "flat" model of memory, the separation of pointers to selectors, near and far pointers has sunk into summer, but backward compatibility has remained.
The present is described here: https://msdn.microsoft.com/en-us/library/windows/desktop/aa366533(v=vs.85).aspx
And the present says that modern operating systems do not provide a division into global and local heaps, as a result of which the Global and Local function groups are the same and choosing between them is a matter of personal preference (unless of course you write under Win16). Moreover, the transition from a segmental memory model to a virtual one made some of the functions meaningless (since there are no more selectors and near pointers).
In another article, https://msdn.microsoft.com/en-us/library/windows/desktop/aa366596(v=vs.85).aspx, it says that the objects that are allocated for memory through the GlobalAlloc or LocalAlloc functions are located on private, fixed pages of memory with read / write access, but not available for other processes. It also mentions that the size of the allocated physical memory can be MORE than the requested one, and the GlobalSize and LocalSize functions should be used to determine the actual allocated size. In addition, there is also written about the huge overhead of the Global and Local functions, so their use in the modern world is highly discouraged (in the case of development for an appropriate platform).
As for the speed of the work of freeing memory, then the question is complex and ambiguous, because what the OS kernel does when calling GlobalFree is known only to Hindus, this kernel is written by.
If you made measurements in debug and msvc, then you need to set _NO_DEBUG_HEAP = 1 in the environment settings of the studio, since Debug uses a completely different implementation of memory allocation for debugging.
mallocornew?) - VladDmalloc. - VladD