• Home
  • Raw
  • Download

Lines Matching refs:n

814 dvmHeapSourceAlloc(size_t n)  in dvmHeapSourceAlloc()  argument
822 if (heap->bytesAllocated + n > hs->softLimit) { in dvmHeapSourceAlloc()
828 FRACTIONAL_MB(hs->softLimit), n); in dvmHeapSourceAlloc()
831 ptr = mspace_calloc(heap->msp, 1, n); in dvmHeapSourceAlloc()
860 heapAllocAndGrow(HeapSource *hs, Heap *heap, size_t n) in heapAllocAndGrow() argument
873 ptr = dvmHeapSourceAlloc(n); in heapAllocAndGrow()
892 dvmHeapSourceAllocAndGrow(size_t n) in dvmHeapSourceAllocAndGrow() argument
902 ptr = dvmHeapSourceAlloc(n); in dvmHeapSourceAllocAndGrow()
913 ptr = dvmHeapSourceAlloc(n); in dvmHeapSourceAllocAndGrow()
927 ptr = heapAllocAndGrow(hs, heap, n); in dvmHeapSourceAllocAndGrow()
1595 externalAlloc(HeapSource *hs, size_t n, bool grow) in externalAlloc() argument
1599 HSTRACE("externalAlloc(%zd%s)\n", n, grow ? ", grow" : ""); in externalAlloc()
1600 assert(externalBytesAvailable(hs, n)); // The caller must ensure this. in externalAlloc()
1605 if (hs->externalBytesAllocated + n <= hs->externalLimit) { in externalAlloc()
1606 hs->externalBytesAllocated += n; in externalAlloc()
1611 gDvm.allocProf.externalAllocSize += n; in externalAlloc()
1614 self->allocProf.externalAllocSize += n; in externalAlloc()
1625 hs->externalBytesAllocated += n; in externalAlloc()
1651 static bool externalAllocPossible(const HeapSource *hs, size_t n) in externalAllocPossible() argument
1658 if (externalBytesAvailable(hs, n)) { in externalAllocPossible()
1672 if (externalBytesAvailable(hs, n)) { in externalAllocPossible()
1680 if (externalBytesAvailable(hs, n)) { in externalAllocPossible()
1688 if (externalBytesAvailable(hs, n)) { in externalAllocPossible()
1705 dvmTrackExternalAllocation(size_t n) in dvmTrackExternalAllocation() argument
1722 if (!externalAllocPossible(hs, n)) { in dvmTrackExternalAllocation()
1724 "too large for this process.", n); in dvmTrackExternalAllocation()
1731 n, hs->externalBytesAllocated, hs->externalLimit); in dvmTrackExternalAllocation()
1732 if (externalAlloc(hs, n, false)) { in dvmTrackExternalAllocation()
1746 if (!externalAllocPossible(hs, n)) { in dvmTrackExternalAllocation()
1748 "too large for this process.", n); in dvmTrackExternalAllocation()
1755 HSTRACE("EXTERNAL alloc %zd: GC 1\n", n); in dvmTrackExternalAllocation()
1757 if (externalAlloc(hs, n, false)) { in dvmTrackExternalAllocation()
1765 HSTRACE("EXTERNAL alloc %zd: frag\n", n); in dvmTrackExternalAllocation()
1766 ret = externalAlloc(hs, n, true); in dvmTrackExternalAllocation()
1774 HSTRACE("EXTERNAL alloc %zd: GC 2\n", n); in dvmTrackExternalAllocation()
1776 ret = externalAlloc(hs, n, true); in dvmTrackExternalAllocation()
1778 LOGE_HEAP("Out of external memory on a %zu-byte allocation.\n", n); in dvmTrackExternalAllocation()
1785 gDvm.allocProf.failedExternalAllocSize += n; in dvmTrackExternalAllocation()
1788 self->allocProf.failedExternalAllocSize += n; in dvmTrackExternalAllocation()
1803 dvmTrackExternalFree(size_t n) in dvmTrackExternalFree() argument
1810 n, hs->externalBytesAllocated, hs->externalLimit); in dvmTrackExternalFree()
1821 if (n <= hs->externalBytesAllocated) { in dvmTrackExternalFree()
1822 hs->externalBytesAllocated -= n; in dvmTrackExternalFree()
1824 n = hs->externalBytesAllocated; in dvmTrackExternalFree()
1832 gDvm.allocProf.externalFreeSize += n; in dvmTrackExternalFree()
1835 self->allocProf.externalFreeSize += n; in dvmTrackExternalFree()