Lines Matching full:capacity
11 struct vmci_handle_arr *vmci_handle_arr_create(u32 capacity, u32 max_capacity) in vmci_handle_arr_create() argument
15 if (max_capacity == 0 || capacity > max_capacity) in vmci_handle_arr_create()
18 if (capacity == 0) in vmci_handle_arr_create()
19 capacity = min((u32)VMCI_HANDLE_ARRAY_DEFAULT_CAPACITY, in vmci_handle_arr_create()
22 array = kmalloc(struct_size(array, entries, capacity), GFP_ATOMIC); in vmci_handle_arr_create()
26 array->capacity = capacity; in vmci_handle_arr_create()
43 if (unlikely(array->size >= array->capacity)) { in vmci_handle_arr_append_entry()
46 u32 capacity_bump = min(array->max_capacity - array->capacity, in vmci_handle_arr_append_entry()
47 array->capacity); in vmci_handle_arr_append_entry()
49 size_add(array->capacity, capacity_bump)); in vmci_handle_arr_append_entry()
58 new_array->capacity += capacity_bump; in vmci_handle_arr_append_entry()