Lines Matching defs:size
254 * Allocate "size" bytes of storage, associated with a particular class
257 * It's okay for size to be zero.
265 void* dvmLinearAlloc(Object* classLoader, size_t size)
272 return calloc(1, size);
275 LOGVV("--- LinearAlloc(%p, %d)", classLoader, size);
278 * What we'd like to do is just determine the new end-of-alloc size
295 * add the size of data they want, add another header's worth so we
298 * chunk header size off so we're back to the header pointer.
301 * old=12 size=3 new=((12+(4*2)+3+7) & ~7)-4 = 24-4 --> 20
302 * old=12 size=5 new=((12+(4*2)+5+7) & ~7)-4 = 32-4 --> 28
304 nextOffset = ((startOffset + HEADER_EXTRA*2 + size + (BLOCK_ALIGN-1))
306 LOGVV("--- old=%d size=%d new=%d", startOffset, size, nextOffset);
316 pHdr->mapLength, (int) size);
321 * Round up "size" to encompass the entire region, including the 0-7
326 size = nextOffset - (startOffset + HEADER_EXTRA);
327 LOGVV("--- (size now %d)", size);
372 start, end, size, pHdr->mapAddr + startOffset + HEADER_EXTRA);
377 /* stow the size in the header */
379 *(u4*)(pHdr->mapAddr + startOffset) = size | LENGTHFLAG_RW;
381 *(u4*)(pHdr->mapAddr + startOffset) = size;
411 * If the new size is <= the old size, we return the original pointer
414 * If the new size is > the old size, we allocate new storage, copy the
431 /* handle size reduction case */