188 return ERROR_INT(
"numalloc not defined", __func__, 1);
189 numaGetSum(numalloc, &nchunks);
190 if (nchunks > 1000.0)
191 L_WARNING(
"There are %.0f chunks\n", __func__, nchunks);
200 nlevels = numaGetCount(numalloc);
203 if ((
sizes = (
size_t *)LEPT_CALLOC(
nlevels,
sizeof(
size_t))) == NULL)
204 return ERROR_INT(
"sizes not made", __func__, 1);
213 alloca = numaGetIArray(numalloc);
216 return ERROR_INT(
"paa not made", __func__, 1);
223 if ((
baseptr = (l_uint32 *)LEPT_CALLOC(
nbytes / 4,
sizeof(l_uint32)))
225 return ERROR_INT(
"calloc fail for baseptr", __func__, 1);
230 return ERROR_INT(
"calloc fail for firstptr", __func__, 1);
234 for (i = 0; i <
nlevels; i++) {
235 if ((pa = ptraCreate(alloca[i])) == NULL)
236 return ERROR_INT(
"pa not made", __func__, 1);
237 ptraaInsertPtra(
paa, i, pa);
239 for (j = 0; j < alloca[i]; j++) {
241 data +=
sizes[i] / 4;
248 pms->
memmax = (l_int32 *)LEPT_CALLOC(
nlevels,
sizeof(l_int32));