src/allocator.c

branch
docs/3.1
changeset 1169
6a33a5648027
parent 1134
60edcd57d54c
equal deleted inserted replaced
1168:d92124c8db73 1169:6a33a5648027
45 return realloc(mem, n); 45 return realloc(mem, n);
46 } 46 }
47 47
48 static void *cx_calloc_stdlib( 48 static void *cx_calloc_stdlib(
49 cx_attr_unused void *d, 49 cx_attr_unused void *d,
50 size_t nelem, 50 size_t nmemb,
51 size_t n 51 size_t size
52 ) { 52 ) {
53 return calloc(nelem, n); 53 return calloc(nmemb, size);
54 } 54 }
55 55
56 static void cx_free_stdlib( 56 static void cx_free_stdlib(
57 cx_attr_unused void *d, 57 cx_attr_unused void *d,
58 void *mem 58 void *mem
167 } 167 }
168 } 168 }
169 169
170 void *cxCalloc( 170 void *cxCalloc(
171 const CxAllocator *allocator, 171 const CxAllocator *allocator,
172 size_t nelem, 172 size_t nmemb,
173 size_t n 173 size_t size
174 ) { 174 ) {
175 return allocator->cl->calloc(allocator->data, nelem, n); 175 return allocator->cl->calloc(allocator->data, nmemb, size);
176 } 176 }
177 177
178 void cxFree( 178 void cxFree(
179 const CxAllocator *allocator, 179 const CxAllocator *allocator,
180 void *mem 180 void *mem

mercurial