/ext-ds/src/ds/ |
H A D | ds_priority_queue.c | 56 queue->nodes = reallocate_nodes(queue->nodes, capacity); in reallocate_to_capacity() 57 queue->capacity = capacity; in reallocate_to_capacity() 62 reallocate_to_capacity(queue, queue->capacity * 2); in increase_capacity() 67 capacity = ds_priority_queue_get_capacity_for_size(capacity); in ds_priority_queue_allocate() 69 if (capacity > queue->capacity) { in ds_priority_queue_allocate() 70 reallocate_to_capacity(queue, capacity); in ds_priority_queue_allocate() 79 queue->capacity = DS_PRIORITY_QUEUE_MIN_CAPACITY; in ds_priority_queue() 88 return queue->capacity; in ds_priority_queue_capacity() 101 if (queue->size == queue->capacity) { in ds_priority_queue_push() 139 …if (queue->size <= (queue->capacity / 4) && (queue->capacity / 2) >= DS_PRIORITY_QUEUE_MIN_CAPACIT… in ds_priority_queue_compact() [all …]
|
H A D | ds_vector.c | 17 …vector->buffer = ds_reallocate_zval_buffer(vector->buffer, capacity, vector->capacity, vector->s… in ds_vector_reallocate() 18 vector->capacity = capacity; in ds_vector_reallocate() 21 ds_vector_t *ds_vector_ex(zend_long capacity) in ds_vector_ex() argument 26 capacity = MAX(capacity, DS_VECTOR_MIN_CAPACITY); in ds_vector_ex() 29 vector->capacity = capacity; in ds_vector_ex() 49 clone->capacity = vector->capacity; in ds_vector_clone() 68 vector->capacity = capacity; in ds_vector_from_buffer() 76 if (capacity > vector->capacity) { in ds_vector_allocate() 83 ds_vector_reallocate(vector, vector->capacity + (vector->capacity >> 1)); in ds_vector_increase_capacity() 88 if (capacity > vector->capacity) { in ds_vector_ensure_capacity() [all …]
|
H A D | ds_deque.c | 48 deque->capacity = DS_DEQUE_MIN_CAPACITY; in ds_deque() 74 deque->capacity = capacity; in ds_deque_from_buffer() 149 …deque->buffer = ds_reallocate_zval_buffer(deque->buffer, capacity, deque->capacity, deque->size); in ds_deque_reallocate() 150 deque->capacity = capacity; in ds_deque_reallocate() 168 if (capacity > deque->capacity) { in ds_deque_allocate() 169 ds_deque_reallocate(deque, capacity); in ds_deque_allocate() 176 if (deque->size <= deque->capacity / 4) { in ds_deque_auto_truncate() 196 deque->capacity = DS_DEQUE_MIN_CAPACITY; in ds_deque_clear() 257 zend_long mask = deque->capacity - 1; in ds_deque_reverse() 379 if (deque->size == deque->capacity) { in ds_deque_push() [all …]
|
H A D | ds_htable.c | 21 return emalloc(capacity * sizeof(uint32_t)); in ds_htable_allocate_lookup() 38 table->capacity = capacity; in ds_htable_realloc() 43 const uint32_t mask = table->capacity - 1; in ds_htable_rehash() 48 table->min_deleted = table->capacity; in ds_htable_rehash() 114 const uint32_t capacity = table->capacity; in ds_htable_auto_truncate() local 116 if (table->size <= (capacity / 4) && (capacity / 2) >= DS_HTABLE_MIN_CAPACITY) { in ds_htable_auto_truncate() 129 table->capacity = capacity; in ds_htable_with_capacity() 130 table->min_deleted = capacity; in ds_htable_with_capacity() 166 dst->capacity = src->capacity; in ds_htable_clone() 630 capacity = ds_htable_get_capacity_for_size(capacity); in ds_htable_ensure_capacity() [all …]
|
H A D | ds_queue.c | 33 void ds_queue_allocate(ds_queue_t *queue, zend_long capacity) in ds_queue_allocate() argument 35 ds_deque_allocate(queue->deque, capacity); in ds_queue_allocate() 40 return queue->deque->capacity; in ds_queue_capacity()
|
H A D | ds_deque.h | 14 const zend_long _mask = _deque->capacity - 1; \ 28 zend_long capacity; member 35 ds_deque_t *ds_deque_ex(zend_long capacity); 40 void ds_deque_allocate(ds_deque_t *deque, zend_long capacity);
|
H A D | ds_vector.h | 8 zend_long capacity; // Buffer length member 46 ds_vector_t *ds_vector_ex(zend_long capacity); 47 ds_vector_t *ds_vector_from_buffer(zval *buffer, zend_long capacity, zend_long size); 49 void ds_vector_allocate(ds_vector_t *vector, zend_long capacity);
|
H A D | ds_stack.h | 8 #define DS_STACK_CAPACITY(s) ((s)->vector->capacity) 39 void ds_stack_allocate(ds_stack_t *stack, zend_long capacity);
|
H A D | ds_priority_queue.h | 13 uint32_t capacity; member 59 void ds_priority_queue_allocate(ds_priority_queue_t *queue, uint32_t capacity);
|
H A D | ds_stack.c | 32 void ds_stack_allocate(ds_stack_t *stack, zend_long capacity) in ds_stack_allocate() argument 34 ds_vector_allocate(stack->vector, capacity); in ds_stack_allocate()
|
H A D | ds_set.h | 8 #define DS_SET_CAPACITY(s) ((s)->table->capacity) 24 void ds_set_allocate(ds_set_t *set, zend_long capacity);
|
/ext-ds/src/php/classes/ |
H A D | php_priority_queue_ce.c | 24 PARSE_LONG(capacity); in METHOD() 25 ds_priority_queue_allocate(THIS_DS_PRIORITY_QUEUE(), capacity); in METHOD() 28 METHOD(capacity) in METHOD() argument 100 PHP_DS_ME(PriorityQueue, capacity) in php_ds_register_priority_queue()
|
H A D | php_stack_ce.c | 29 PARSE_LONG(capacity); in METHOD() 30 ds_stack_allocate(THIS_DS_STACK(), capacity); in METHOD() 33 METHOD(capacity) in METHOD() argument 133 PHP_DS_ME(Stack, capacity) in php_ds_register_stack()
|
H A D | php_queue_ce.c | 28 PARSE_LONG(capacity); in METHOD() 29 ds_queue_allocate(THIS_DS_QUEUE(), capacity); in METHOD() 32 METHOD(capacity) in METHOD() argument 130 PHP_DS_ME(Queue, capacity) in php_ds_register_queue()
|
H A D | php_priority_queue_ce.h | 11 ARGINFO_LONG( PriorityQueue_allocate, capacity);
|
H A D | php_queue_ce.h | 11 ARGINFO_LONG( Queue_allocate, capacity);
|
H A D | php_stack_ce.h | 11 ARGINFO_LONG( Stack_allocate, capacity);
|
H A D | php_deque_ce.c | 39 PARSE_LONG(capacity); in METHOD() 40 ds_deque_allocate(THIS_DS_DEQUE(), capacity); in METHOD() 49 METHOD(capacity) in METHOD() argument 52 RETURN_LONG((THIS_DS_DEQUE())->capacity); in METHOD()
|
H A D | php_vector_ce.c | 29 PARSE_LONG(capacity); in METHOD() 30 ds_vector_allocate(THIS_DS_VECTOR(), capacity); in METHOD() 39 METHOD(capacity) in METHOD() argument 42 RETURN_LONG((THIS_DS_VECTOR())->capacity); in METHOD()
|
H A D | php_set_ce.c | 39 PARSE_LONG(capacity); in METHOD() 40 ds_set_allocate(THIS_DS_SET(), capacity); in METHOD() 43 METHOD(capacity) in METHOD() argument 269 PHP_DS_ME(Set, capacity) in php_ds_register_set()
|
H A D | php_sequence_ce.h | 14 PHP_DS_SEQUENCE_ME(cls, capacity) \ 44 ARGINFO_LONG( Sequence_allocate, capacity);
|
H A D | php_sequence_ce.c | 16 SEQUENCE_ABSTRACT_ME(capacity) in php_ds_register_sequence()
|
H A D | php_map_ce.c | 32 PARSE_LONG(capacity); in METHOD() 33 ds_map_allocate(THIS_DS_MAP(), capacity); in METHOD() 42 METHOD(capacity) in METHOD() argument 325 PHP_DS_ME(Map, capacity) in php_ds_register_map()
|
H A D | php_set_ce.h | 12 ARGINFO_LONG( Set_allocate, capacity);
|
/ext-ds/ |
H A D | CHANGELOG.md | 49 - Minor capacity adjustments. 53 - Vector's minimum and default capacity down from 10 to 8. 54 - Map and Set's minimum and default capacity down from 16 to 8. 76 - `Map` truncating to capacity less than the minimum.
|