Lines Matching full:buffer_size
64 return alloc->buffer + alloc->buffer_size - buffer->user_data; in binder_alloc_buffer_size()
74 size_t buffer_size; in binder_insert_free_buffer() local
90 buffer_size = binder_alloc_buffer_size(alloc, buffer); in binder_insert_free_buffer()
92 if (new_buffer_size < buffer_size) in binder_insert_free_buffer()
355 size_t buffer_size; in debug_no_space_locked() local
360 buffer_size = binder_alloc_buffer_size(alloc, buffer); in debug_no_space_locked()
362 total_alloc_size += buffer_size; in debug_no_space_locked()
363 if (buffer_size > largest_alloc_size) in debug_no_space_locked()
364 largest_alloc_size = buffer_size; in debug_no_space_locked()
369 buffer_size = binder_alloc_buffer_size(alloc, buffer); in debug_no_space_locked()
371 total_free_size += buffer_size; in debug_no_space_locked()
372 if (buffer_size > largest_free_size) in debug_no_space_locked()
373 largest_free_size = buffer_size; in debug_no_space_locked()
402 if (alloc->free_async_space >= alloc->buffer_size / 10) { in debug_low_async_space_locked()
423 if (num_buffers > 50 || total_alloc_size > alloc->buffer_size / 4) { in debug_low_async_space_locked()
447 size_t buffer_size; in binder_alloc_new_buf_locked() local
460 buffer_size = binder_alloc_buffer_size(alloc, buffer); in binder_alloc_new_buf_locked()
462 if (size < buffer_size) { in binder_alloc_new_buf_locked()
465 } else if (size > buffer_size) { in binder_alloc_new_buf_locked()
482 if (buffer_size != size) { in binder_alloc_new_buf_locked()
485 buffer_size = binder_alloc_buffer_size(alloc, buffer); in binder_alloc_new_buf_locked()
487 WARN_ON(n || buffer_size == size); in binder_alloc_new_buf_locked()
497 alloc->pid, size, buffer, buffer_size); in binder_alloc_new_buf_locked()
501 * with buffer_size determines if the last page is shared with an in binder_alloc_new_buf_locked()
505 next_used_page = (buffer->user_data + buffer_size) & PAGE_MASK; in binder_alloc_new_buf_locked()
662 size_t size, buffer_size; in binder_free_buf_locked() local
664 buffer_size = binder_alloc_buffer_size(alloc, buffer); in binder_free_buf_locked()
671 "%d: binder_free_buf %pK size %zd buffer_size %zd\n", in binder_free_buf_locked()
672 alloc->pid, buffer, size, buffer_size); in binder_free_buf_locked()
675 BUG_ON(size > buffer_size); in binder_free_buf_locked()
678 BUG_ON(buffer->user_data > alloc->buffer + alloc->buffer_size); in binder_free_buf_locked()
681 alloc->free_async_space += buffer_size; in binder_free_buf_locked()
688 (buffer->user_data + buffer_size) & PAGE_MASK); in binder_free_buf_locked()
828 if (alloc->buffer_size) { in binder_alloc_mmap_handler()
833 alloc->buffer_size = min_t(unsigned long, vma->vm_end - vma->vm_start, in binder_alloc_mmap_handler()
839 alloc->pages = kvcalloc(alloc->buffer_size / PAGE_SIZE, in binder_alloc_mmap_handler()
848 for (i = 0; i < alloc->buffer_size / PAGE_SIZE; i++) { in binder_alloc_mmap_handler()
864 alloc->free_async_space = alloc->buffer_size / 2; in binder_alloc_mmap_handler()
877 alloc->buffer_size = 0; in binder_alloc_mmap_handler()
927 for (i = 0; i < alloc->buffer_size / PAGE_SIZE; i++) { in binder_alloc_deferred_release()
1000 for (i = 0; i < alloc->buffer_size / PAGE_SIZE; i++) { in binder_alloc_print_pages()
1205 size_t buffer_size = binder_alloc_buffer_size(alloc, buffer); in check_buffer() local
1207 return buffer_size >= bytes && in check_buffer()
1208 offset <= buffer_size - bytes && in check_buffer()