MCPcopy Create free account
hub / github.com/acl-dev/acl / array_create

Function array_create

lib_fiber/c/src/common/array.c:147–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147ARRAY *array_create(int init_size, unsigned flags)
148{
149 ARRAY *a;
150
151 a = (ARRAY *) mem_calloc(1, sizeof(ARRAY));
152 a->flags = flags;
153 a->push_back = array_push_back;
154 a->push_front = array_push_front;
155 a->pop_back = array_pop_back;
156 a->pop_front = array_pop_front;
157 a->iter_head = array_iter_head;
158 a->iter_next = array_iter_next;
159 a->iter_tail = array_iter_tail;
160 a->iter_prev = array_iter_prev;
161
162 if(init_size <= 0) {
163 init_size = 100;
164 }
165
166 array_pre_append(a, init_size);
167
168 return a;
169}
170
171void array_clean(ARRAY *a, void (*free_fn)(void *))
172{

Callers 13

thread_initFunction · 0.85
kqueue_allocFunction · 0.85
epoll_allocFunction · 0.85
timer_cache_createFunction · 0.85
create_ownerFunction · 0.85
create_waiterFunction · 0.85
acl_fiber_mutex_createFunction · 0.85
acl_fiber_cond_createFunction · 0.85
event_iocp_createFunction · 0.85
event_poll_createFunction · 0.85
event_select_createFunction · 0.85
event_kqueue_createFunction · 0.85

Calls 2

mem_callocFunction · 0.85
array_pre_appendFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…