Lines Matching refs:bytes
188 void* debug_memalign(size_t alignment, size_t bytes);
189 void* debug_realloc(void* pointer, size_t bytes);
190 void* debug_calloc(size_t nmemb, size_t bytes);
201 void* debug_pvalloc(size_t bytes);
570 size_t bytes = InternalMallocUsableSize(pointer); in InternalMalloc() local
572 bytes = (bytes < fill_bytes) ? bytes : fill_bytes; in InternalMalloc()
573 memset(pointer, g_debug->config().fill_alloc_value(), bytes); in InternalMalloc()
612 size_t bytes; in InternalFree() local
631 bytes = header->usable_size; in InternalFree()
633 bytes = g_dispatch->malloc_usable_size(pointer); in InternalFree()
638 fill_bytes = (bytes < fill_bytes) ? bytes : fill_bytes; in InternalFree()
653 pointer = PointerData::AddFreed(pointer, bytes); in InternalFree()
687 void* debug_memalign(size_t alignment, size_t bytes) { in debug_memalign() argument
691 return g_dispatch->memalign(alignment, bytes); in debug_memalign()
697 if (bytes == 0) { in debug_memalign()
698 bytes = 1; in debug_memalign()
701 if (bytes > PointerInfoType::MaxSize()) { in debug_memalign()
722 size_t real_size = alignment + bytes + g_debug->extra_bytes(); in debug_memalign()
723 if (real_size < bytes) { in debug_memalign()
741 pointer = InitHeader(header, pointer, bytes); in debug_memalign()
743 size_t real_size = bytes + g_debug->extra_bytes(); in debug_memalign()
744 if (real_size < bytes) { in debug_memalign()
755 PointerData::Add(pointer, bytes); in debug_memalign()
759 size_t bytes = InternalMallocUsableSize(pointer); in debug_memalign() local
761 bytes = (bytes < fill_bytes) ? bytes : fill_bytes; in debug_memalign()
762 memset(pointer, g_debug->config().fill_alloc_value(), bytes); in debug_memalign()
766 g_debug->record->AddEntry(new MemalignEntry(pointer, bytes, alignment, in debug_memalign()
774 void* debug_realloc(void* pointer, size_t bytes) { in debug_realloc() argument
778 return g_dispatch->realloc(pointer, bytes); in debug_realloc()
785 TimedResult result = InternalMalloc(bytes); in debug_realloc()
787 g_debug->record->AddEntry(new ReallocEntry(result.getValue<void*>(), bytes, nullptr, in debug_realloc()
798 if (bytes == 0) { in debug_realloc()
802 g_debug->record->AddEntry(new ReallocEntry(nullptr, bytes, pointer, result.GetStartTimeNS(), in debug_realloc()
809 size_t real_size = bytes; in debug_realloc()
812 if (real_size < bytes) { in debug_realloc()
819 if (bytes > PointerInfoType::MaxSize()) { in debug_realloc()
858 result = InternalMalloc(bytes); in debug_realloc()
889 size_t bytes = InternalMallocUsableSize(new_pointer); in debug_realloc() local
890 if (bytes > g_debug->config().fill_on_alloc_bytes()) { in debug_realloc()
891 bytes = g_debug->config().fill_on_alloc_bytes(); in debug_realloc()
893 if (bytes > prev_size) { in debug_realloc()
895 g_debug->config().fill_alloc_value(), bytes - prev_size); in debug_realloc()
900 g_debug->record->AddEntry(new ReallocEntry(new_pointer, bytes, pointer, result.GetStartTimeNS(), in debug_realloc()
907 void* debug_calloc(size_t nmemb, size_t bytes) { in debug_calloc() argument
911 return g_dispatch->calloc(nmemb, bytes); in debug_calloc()
918 if (__builtin_mul_overflow(nmemb, bytes, &size)) { in debug_calloc()
958 new CallocEntry(pointer, nmemb, bytes, result.GetStartTimeNS(), result.GetEndTimeNS())); in debug_calloc()
1087 void* debug_pvalloc(size_t bytes) { in debug_pvalloc() argument
1091 return g_dispatch->pvalloc(bytes); in debug_pvalloc()
1095 size_t size = __BIONIC_ALIGN(bytes, pagesize); in debug_pvalloc()
1096 if (size < bytes) { in debug_pvalloc()