> On 15 Sep 2022, at 01:19, Ranier Vilela <ranier.vf@gmail.com> wrote:
> LocalAlloc is deprecated.
> So use HeapAlloc instead, once LocalAlloc is an overhead wrapper to HeapAlloc.
>
> Attached a patch.
Don't forget that patches which aim to reduce overhead are best when
accompanied with benchmarks which show the effect of the reduction.
- pacl = (PACL) LocalAlloc(LPTR, dwNewAclSize);
+ pacl = (PACL) HeapAlloc(hDefaultProcessHeap, 0, dwNewAclSize);
These calls are not equal, the LocalAlloc calls zeroes out the allocated memory
but the HeapAlloc does not unless the HEAP_ZERO_MEMORY flag is passed. I
haven't read the code enough to know if that matters, but it seems relevant to
at least discuss.
--
Daniel Gustafsson https://vmware.com/