Home | History | Annotate | Download | only in builtins

Lines Matching defs:array

97     uintptr_t size;  /* number of elements in the 'data' array */
104 emutls_address_array* array = (emutls_address_array*)ptr;
106 for (i = 0; i < array->size; ++i) {
107 if (array->data[i])
108 emutls_memalign_free(array->data[i]);
136 static __inline void emutls_check_array_set_size(emutls_address_array *array,
138 if (array == NULL)
140 array->size = size;
141 pthread_setspecific(emutls_pthread_key, (void*)array);
144 /* Returns the new 'data' array size, number of elements,
149 * to store the data array size.
160 emutls_address_array* array = pthread_getspecific(emutls_pthread_key);
161 if (array == NULL) {
163 array = calloc(new_size + 1, sizeof(void*));
164 emutls_check_array_set_size(array, new_size);
165 } else if (index > array->size) {
166 uintptr_t orig_size = array->size;
168 array = realloc(array, (new_size + 1) * sizeof(void*));
169 if (array)
170 memset(array->data + orig_size, 0,
172 emutls_check_array_set_size(array, new_size);
174 return array;
179 emutls_address_array* array = emutls_get_address_array(index);
180 if (array->data[index - 1] == NULL)
181 array->data[index - 1] = emutls_allocate_object(control);
182 return array->data[index - 1];