MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / track_shm_data

Function track_shm_data

libCacheSim/dataStructure/ketama/ketama.c:82–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82static void
83track_shm_data(int *data) {
84 if (num_data == shm_data_size) {
85 void *tmp = realloc(shm_data, sizeof(int*)*(shm_data_size + 1024));
86 if (tmp != NULL) {
87 shm_data = tmp;
88 } else {
89 set_error("Cannot realloc shm data tracker");
90 exit(1);
91 }
92
93 shm_data_size += 1024;
94 }
95
96 shm_data[num_data] = data;
97 num_data++;
98}
99
100static void
101track_sem_id(int semid) {

Callers 1

ketama_rollFunction · 0.70

Calls 1

set_errorFunction · 0.70

Tested by

no test coverage detected