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

Function timer_cache_create

lib_fiber/c/src/common/timer_cache.c:34–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#endif
33
34TIMER_CACHE *timer_cache_create(void)
35{
36 TIMER_CACHE *cache = mem_malloc(sizeof(TIMER_CACHE));
37
38 fiber_avl_create(&cache->tree,
39 (int (*)(const void*, const void*)) avl_cmp_fn,
40 sizeof(TIMER_CACHE_NODE), offsetof(TIMER_CACHE_NODE, node));
41 ring_init(&cache->caches);
42 cache->cache_max = 1000;
43 cache->objs = array_create(100, ARRAY_F_UNORDER);
44 cache->objs2 = array_create(100, ARRAY_F_UNORDER);
45
46 return cache;
47}
48
49unsigned timer_cache_size(TIMER_CACHE *cache)
50{

Callers 2

event_createFunction · 0.85
thread_initFunction · 0.85

Calls 4

mem_mallocFunction · 0.85
fiber_avl_createFunction · 0.85
ring_initFunction · 0.85
array_createFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…