z_malloc failed on allocation of xxx bytes or D_SCAlloc: bad cache size 0
Another insufficient memory or misallocated memory error. Possible causes are many, including too little RAM & also by having a texture perpendicular to the face of the solid with WC. In one case it was a script that shifted models one button. Possible solutions are:
1. For memory telling the HL main engine how much memory to use with HL -heapsize # (1024 x number of meg is popular #) or HL -zone # in the shortcut.
2. For texture perpendicular go into WC/Hammer, then you can press alt + p, and select the problem if it is listed, and tell it to fix all of type; then try to compile again.
3. Or go thru the other errors on this page and try them as fixes. It CAN be frustrating! Sorry.