Home | History | Annotate | Download | only in builtins

Lines Matching refs:array

101     uintptr_t size;  /* number of elements in the 'data' array */
108 emutls_address_array* array = (emutls_address_array*)ptr;
110 for (i = 0; i < array->size; ++i) {
111 if (array->data[i])
112 emutls_memalign_free(array->data[i]);
140 static __inline void emutls_check_array_set_size(emutls_address_array *array,
142 if (array == NULL)
144 array->size = size;
145 pthread_setspecific(emutls_pthread_key, (void*)array);
148 /* Returns the new 'data' array size, number of elements,
153 * to store the data array size.
164 emutls_address_array* array = pthread_getspecific(emutls_pthread_key);
165 if (array == NULL) {
167 array = malloc(new_size * sizeof(void *) + sizeof(emutls_address_array));
168 if (array)
169 memset(array->data, 0, new_size * sizeof(void*));
170 emutls_check_array_set_size(array, new_size);
171 } else if (index > array->size) {
172 uintptr_t orig_size = array->size;
174 array = realloc(array, new_size * sizeof(void *) + sizeof(emutls_address_array));
175 if (array)
176 memset(array->data + orig_size, 0,
178 emutls_check_array_set_size(array, new_size);
180 return array;
185 emutls_address_array* array = emutls_get_address_array(index);
186 if (array->data[index - 1] == NULL)
187 array->data[index - 1] = emutls_allocate_object(control);
188 return array->data[index - 1];