Lines Matching defs:array
45 KXLDArray array;
53 bzero(&array, sizeof(array));
61 rval = kxld_array_init(&array, sizeof(u_int), titems);
63 assert(array.nitems == titems);
67 item = kxld_array_get_item(&array, idx);
69 assert(item == kxld_array_get_slot(&array, idx));
72 item = kxld_array_get_item(&array, idx);
74 assert(item == kxld_array_get_slot(&array, idx));
77 item = kxld_array_get_item(&array, idx);
82 assert(item == kxld_array_get_slot(&array, idx));
87 rval = kxld_array_resize(&array, titems);
89 assert(array.nitems == titems);
93 item = kxld_array_get_item(&array, idx);
95 assert(item == kxld_array_get_slot(&array, idx));
98 item = kxld_array_get_item(&array, idx);
100 assert(item == kxld_array_get_slot(&array, idx));
103 item = kxld_array_get_item(&array, idx);
108 assert(item != kxld_array_get_slot(&array, idx));
111 (void) kxld_array_clear(&array);
112 item = kxld_array_get_item(&array, 0);
116 /* The array allocates its internal storage in pages. Because get_slot()
122 item = kxld_array_get_slot(&array, 0);
124 item = kxld_array_get_slot(&array, titems - 1);
126 item = kxld_array_get_slot(&array, titems);
132 rval = kxld_array_init(&array, sizeof(u_int), titems);
134 assert(array.nitems == titems);
139 item = kxld_array_get_item(&array, i);
147 item = kxld_array_get_item(&array, i);
152 (void) kxld_array_deinit(&array);