On Sun, Jan 23, 2005 at 08:42:52PM -0800, Steven Edwards wrote:
Changelog: Eric Kohl eric.kohl@t-online.de Implement MyFree, MyMalloc and MyRealloc
...
--- /dev/null 2005-01-23 12:40:28.000000000 -0500 +++ misc.c 2005-01-23 18:50:33.000000000 -0500 +LPVOID WINAPI MyMalloc(DWORD dwSize) +{
- return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize);
+}
...
+LPVOID WINAPI MyRealloc(LPVOID lpSrc, DWORD dwSize) +{
- if (lpSrc == NULL)
return HeapAlloc(GetProcessHeap(), 0, dwSize);
- return HeapReAlloc(GetProcessHeap(), 0, lpSrc, dwSize);
+}
So MyAlloc zeros the memory while MyRealloc doesn't - is this really correct? If so I think a comment, at the very least, is in order.
Huw.