According to: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-localalloc "Note The local functions have greater overhead and provide fewer features than other memory management functions. New applications should use the heap functions unless documentation states that a local function should be used. For more information, see Global and Local Functions."
LocalAlloc is deprecated.
So use HeapAlloc instead, once LocalAlloc is an overhead wrapper to HeapAlloc.