Lines Matching full:array
17 together an array from smaller parts; the flexible array library exists to make
20 A flexible array holds an arbitrary (within limits) number of fixed-sized
25 system page size, and putting data into a flexible array requires a copy
27 locking at all; if concurrent access to an array is possible, then the
30 The creation of a flexible array is done with :c:func:`flex_array_alloc()`::
39 maximum number of objects which can be stored in the array. The flags
48 This macro will result in a definition of an array with the given name; the
51 Storing data into a flexible array is accomplished with a call to
54 int flex_array_put(struct flex_array *array, unsigned int element_nr,
57 This call will copy the data from src into the array, in the position
59 the array was created). If any memory allocations must be performed, flags
63 There might possibly be a need to store data into a flexible array while
70 int flex_array_prealloc(struct flex_array *array, unsigned int start,
78 Getting data back out of the array is done with :c:func:`flex_array_get()`::
86 has never been stored in the array. Memory for array elements is allocated
88 adjacent elements. Flexible array elements are normally initialized to the
90 involving that number probably result from use of unstored array entries.
91 Note that, if array elements are allocated with ``__GFP_ZERO``, they will be
94 Individual elements in the array can be cleared with
97 int flex_array_clear(struct flex_array *array, unsigned int element_nr);
100 zero. If storage for the indicated element is not allocated for the array,
103 allocated size of an array, call :c:func:`flex_array_shrink()`::
105 int flex_array_shrink(struct flex_array *array);
108 This function works by scanning the array for pages containing nothing but
110 if the array's pages are allocated with ``__GFP_ZERO``.
112 It is possible to remove all elements of an array with a call to
115 void flex_array_free_parts(struct flex_array *array);
117 This call frees all elements, but leaves the array itself in place.
118 Freeing the entire array is done with :c:func:`flex_array_free()`::
120 void flex_array_free(struct flex_array *array);
127 Flexible array functions