Port PKAlloc from jxrlib JXRGlue.c at f7521879: allocate cb zeroed bytes
with the guest calloc(1, cb), the heap PKFree already frees to, store the
pointer through ppv, NULL included, and return WMP_errSuccess or
WMP_errOutOfMemory (-101). A null ppv, which upstream dereferences, throws.
Allocation.cpp starts with JXRGlue.c's Microsoft notice. Upstream stores it
in Windows-1252; it is converted to UTF-8 (the copyright sign and the two
bullets), with the text unchanged, because the repository accepts UTF-8 only.
Co-Authored-By: Claude Opus 5.5 <[email protected]>