void* _cmsCalloc(unsigned int nelts, unsigned int size) { void *ptr; ptr = gs_alloc_byte_array(gs_lib_ctx_get_non_gc_memory_t(), nelts, size, "lcms"); gs_warn2("lcms calloc (%d) at 0x%x",nelts*size,ptr); return ptr; }
void* _cmsMalloc(unsigned int size) { void *ptr; ptr = gs_alloc_bytes(gs_lib_ctx_get_non_gc_memory_t(), size, "lcms"); gs_warn2("lcms malloc (%d) at 0x%x",size,ptr); return ptr; }
void* _cmsMalloc(unsigned int size) { void *ptr; #if defined(SHARE_LCMS) && SHARE_LCMS==1 ptr = malloc(size); #else ptr = gs_alloc_bytes(gs_lib_ctx_get_non_gc_memory_t(), size, "lcms"); #endif gs_warn2("lcms malloc (%d) at 0x%x",size,ptr); return ptr; }
void* _cmsCalloc(unsigned int nelts, unsigned int size) { void *ptr; #if defined(SHARE_LCMS) && SHARE_LCMS==1 ptr = malloc(nelts * size); #else ptr = gs_alloc_byte_array(gs_lib_ctx_get_non_gc_memory_t(), nelts, size, "lcms"); #endif if (ptr != NULL) memset(ptr, 0, nelts * size); gs_warn2("lcms calloc (%d) at 0x%x",nelts*size,ptr); return ptr; }
static void *gs_lcms2_malloc(cmsContext id, unsigned int size) { void *ptr; gs_memory_t *mem = (gs_memory_t *)id; #if defined(SHARE_LCMS) && SHARE_LCMS==1 ptr = malloc(size); #else ptr = gs_alloc_bytes(mem, size, "lcms"); #endif #if DEBUG_LCMS_MEM gs_warn2("lcms malloc (%d) at 0x%x",size,ptr); #endif return ptr; }