U_CAPI void * U_EXPORT2 uprv_malloc(size_t s) { if (s > 0) { gHeapInUse = TRUE; if (pAlloc) { return (*pAlloc)(pContext, s); } else { return uprv_default_malloc(s); } } else { return (void *)zeroMem; } }
U_CAPI void * U_EXPORT2 uprv_malloc(size_t s) { #if U_DEBUG && defined(UPRV_MALLOC_COUNT) #if 1 putchar('>'); fflush(stdout); #else fprintf(stderr,"MALLOC\t#%d\t%ul bytes\t%ul total\n", ++n,s,(b+=s)); fflush(stderr); #endif #endif if (s > 0) { if (pAlloc) { return (*pAlloc)(pContext, s); } else { return uprv_default_malloc(s); } } else { return (void *)zeroMem; } }