• Home
  • Raw
  • Download

Lines Matching refs:bytes

75 void* debug_memalign(size_t alignment, size_t bytes);
76 void* debug_realloc(void* pointer, size_t bytes);
77 void* debug_calloc(size_t nmemb, size_t bytes);
86 void* debug_pvalloc(size_t bytes);
315 size_t bytes = debug_malloc_usable_size(pointer); in debug_malloc() local
317 bytes = (bytes < fill_bytes) ? bytes : fill_bytes; in debug_malloc()
318 memset(pointer, g_debug->config().fill_alloc_value, bytes); in debug_malloc()
329 size_t bytes; in debug_free() local
360 bytes = header->usable_size; in debug_free()
362 bytes = g_dispatch->malloc_usable_size(pointer); in debug_free()
367 bytes = (bytes < fill_bytes) ? bytes : fill_bytes; in debug_free()
368 memset(pointer, g_debug->config().fill_free_value, bytes); in debug_free()
383 void* debug_memalign(size_t alignment, size_t bytes) { in debug_memalign() argument
385 return g_dispatch->memalign(alignment, bytes); in debug_memalign()
388 if (bytes == 0) { in debug_memalign()
389 bytes = 1; in debug_memalign()
394 if (bytes > Header::max_size()) { in debug_memalign()
412 size_t real_size = alignment + bytes + g_debug->extra_bytes(); in debug_memalign()
413 if (real_size < bytes) { in debug_memalign()
429 pointer = InitHeader(header, pointer, bytes); in debug_memalign()
431 size_t real_size = bytes + g_debug->extra_bytes(); in debug_memalign()
432 if (real_size < bytes) { in debug_memalign()
441 size_t bytes = debug_malloc_usable_size(pointer); in debug_memalign() local
443 bytes = (bytes < fill_bytes) ? bytes : fill_bytes; in debug_memalign()
444 memset(pointer, g_debug->config().fill_alloc_value, bytes); in debug_memalign()
449 void* debug_realloc(void* pointer, size_t bytes) { in debug_realloc() argument
451 return g_dispatch->realloc(pointer, bytes); in debug_realloc()
455 return debug_malloc(bytes); in debug_realloc()
458 if (bytes == 0) { in debug_realloc()
463 size_t real_size = bytes; in debug_realloc()
466 if (real_size < bytes) { in debug_realloc()
476 if (bytes > Header::max_size()) { in debug_realloc()
509 new_pointer = debug_malloc(bytes); in debug_realloc()
527 size_t bytes = debug_malloc_usable_size(new_pointer); in debug_realloc() local
528 if (bytes > g_debug->config().fill_on_alloc_bytes) { in debug_realloc()
529 bytes = g_debug->config().fill_on_alloc_bytes; in debug_realloc()
531 if (bytes > prev_size) { in debug_realloc()
533 g_debug->config().fill_alloc_value, bytes - prev_size); in debug_realloc()
540 void* debug_calloc(size_t nmemb, size_t bytes) { in debug_calloc() argument
542 return g_dispatch->calloc(nmemb, bytes); in debug_calloc()
546 if (__builtin_mul_overflow(nmemb, bytes, &size)) { in debug_calloc()
678 void* debug_pvalloc(size_t bytes) { in debug_pvalloc() argument
680 return g_dispatch->pvalloc(bytes); in debug_pvalloc()
684 size_t size = BIONIC_ALIGN(bytes, pagesize); in debug_pvalloc()
685 if (size < bytes) { in debug_pvalloc()