Searched refs:requiredMem (Results 1 – 7 of 7) sorted by relevance
374 static size_t BMK_findMaxMem(U64 requiredMem) in BMK_findMaxMem() argument379 requiredMem = (((requiredMem >> 26) + 1) << 26); in BMK_findMaxMem()380 requiredMem += 2*step; in BMK_findMaxMem()381 if (requiredMem > maxMemory) requiredMem = maxMemory; in BMK_findMaxMem()384 if (requiredMem > step) requiredMem -= step; in BMK_findMaxMem()385 else requiredMem >>= 1; in BMK_findMaxMem()386 testmem = (BYTE*) malloc ((size_t)requiredMem); in BMK_findMaxMem()391 if (requiredMem > step) requiredMem -= step; in BMK_findMaxMem()392 else requiredMem >>= 1; in BMK_findMaxMem()394 return (size_t)requiredMem; in BMK_findMaxMem()
180 static size_t DiB_findMaxMem(unsigned long long requiredMem) in DiB_findMaxMem() argument185 requiredMem = (((requiredMem >> 23) + 1) << 23); in DiB_findMaxMem()186 requiredMem += step; in DiB_findMaxMem()187 if (requiredMem > g_maxMemory) requiredMem = g_maxMemory; in DiB_findMaxMem()190 testmem = malloc((size_t)requiredMem); in DiB_findMaxMem()191 requiredMem -= step; in DiB_findMaxMem()195 return (size_t)requiredMem; in DiB_findMaxMem()
727 static size_t BMK_findMaxMem(U64 requiredMem) in BMK_findMaxMem() argument732 requiredMem = (((requiredMem >> 26) + 1) << 26); in BMK_findMaxMem()733 requiredMem += step; in BMK_findMaxMem()734 if (requiredMem > maxMemory) requiredMem = maxMemory; in BMK_findMaxMem()737 testmem = (BYTE*)malloc((size_t)requiredMem); in BMK_findMaxMem()738 requiredMem -= step; in BMK_findMaxMem()739 } while (!testmem && requiredMem > 0); in BMK_findMaxMem()742 return (size_t)(requiredMem); in BMK_findMaxMem()
134 static size_t BMK_findMaxMem(U64 requiredMem) in BMK_findMaxMem() argument139 requiredMem = (((requiredMem >> 26) + 1) << 26); in BMK_findMaxMem()140 requiredMem += 2*step; in BMK_findMaxMem()141 if (requiredMem > MAX_MEM) requiredMem = MAX_MEM; in BMK_findMaxMem()144 if (requiredMem > step) requiredMem -= step; in BMK_findMaxMem()145 else requiredMem >>= 1; in BMK_findMaxMem()146 testmem = (BYTE*) malloc ((size_t)requiredMem); in BMK_findMaxMem()151 if (requiredMem > step) requiredMem -= step; in BMK_findMaxMem()152 else requiredMem >>= 1; in BMK_findMaxMem()154 return (size_t)requiredMem; in BMK_findMaxMem()
75 static size_t BMK_findMaxMem(U64 requiredMem) in BMK_findMaxMem() argument80 requiredMem = (((requiredMem >> 26) + 1) << 26); in BMK_findMaxMem()81 if (requiredMem > MAX_MEM) requiredMem = MAX_MEM; in BMK_findMaxMem()83 requiredMem += step; in BMK_findMaxMem()85 testmem = malloc ((size_t)requiredMem); in BMK_findMaxMem()86 requiredMem -= step; in BMK_findMaxMem()90 return (size_t) requiredMem; in BMK_findMaxMem()
381 static size_t BMK_findMaxMem(U64 requiredMem) in BMK_findMaxMem() argument386 requiredMem = (((requiredMem >> 26) + 1) << 26); in BMK_findMaxMem()387 if (requiredMem > maxMemory) requiredMem = maxMemory; in BMK_findMaxMem()389 requiredMem += 2 * step; in BMK_findMaxMem()390 while (!testmem && requiredMem > 0) { in BMK_findMaxMem()391 testmem = malloc ((size_t)requiredMem); in BMK_findMaxMem()392 requiredMem -= step; in BMK_findMaxMem()396 return (size_t) requiredMem; in BMK_findMaxMem()
566 static size_t BMK_findMaxMem(U64 requiredMem) in BMK_findMaxMem() argument571 requiredMem = (((requiredMem >> 26) + 1) << 26); in BMK_findMaxMem()572 requiredMem += step; in BMK_findMaxMem()573 if (requiredMem > maxMemory) requiredMem = maxMemory; in BMK_findMaxMem()576 testmem = (BYTE*)malloc((size_t)requiredMem); in BMK_findMaxMem()577 requiredMem -= step; in BMK_findMaxMem()578 } while (!testmem && requiredMem); /* do not allocate zero bytes */ in BMK_findMaxMem()581 return (size_t)(requiredMem+1); /* avoid zero */ in BMK_findMaxMem()