Hugh McMaster hugh.mcmaster@outlook.com writes:
+static void *heap_alloc(size_t size) +{
- void *buf;
- if (!(buf = HeapAlloc(GetProcessHeap(), 0, size)))
- {
ERR("Out of memory!\n");
exit(1);
- }
- return buf;
+}
That's not the standard heap_alloc(), so a different name would be preferable. I'd suggest heap_xalloc by analogy with xmalloc.