Lines Matching +full:non +full:- +full:negative
1 // SPDX-License-Identifier: GPL-2.0
38 pub(crate) fn as_raw(self) -> u32 { in as_raw()
43 pub fn contains(self, flags: Flags) -> bool { in contains()
50 fn bitor(self, rhs: Self) -> Self::Output { in bitor()
57 fn bitand(self, rhs: Self) -> Self::Output { in bitand()
64 fn not(self) -> Self::Output { in not()
91 /// implementation doesn't support NMI and few other strict non-preemptive contexts (e.g.
95 /// Typical for kernel-internal allocations. The caller requires `ZONE_NORMAL` or a lower zone
113 /// Non Uniform Memory Access (NUMA) node identifier.
118 /// Create a new NUMA node identifier (non-negative integer).
120 /// Returns [`EINVAL`] if a negative id or an id exceeding [`bindings::MAX_NUMNODES`] is
122 pub fn new(node: i32) -> Result<Self> { in new()
140 /// An implementation of [`Allocator`] can allocate, re-allocate and free memory buffers described
152 /// - A memory allocation returned from an allocator must remain valid until it is explicitly freed.
154 /// - Any pointer to a valid memory allocation must be valid to be passed to any other [`Allocator`]
157 /// - Implementers must ensure that all trait functions abide by the guarantees documented in the
178 /// - valid for reads and writes for `layout.size()` bytes, until it is passed to
180 /// - aligned to `layout.align()`,
183 /// <https://docs.kernel.org/core-api/mm-api.html#mm-api-gfp-flags>.
184 fn alloc(layout: Layout, flags: Flags, nid: NumaNode) -> Result<NonNull<[u8]>, AllocError> { in alloc()
190 /// Re-allocate an existing memory allocation to satisfy the requested `layout` and
193 /// Systems employing a Non Uniform Memory Access (NUMA) architecture contain collections of
197 /// `nid` stands for NUMA id, i. e. NUMA node identifier, which is a non-negative integer
215 /// - If `ptr == Some(p)`, then `p` must point to an existing and valid memory allocation
216 /// created by this [`Allocator`]; if `old_layout` is zero-sized `p` does not need to be a
218 /// - `ptr` is allowed to be `None`; in this case a new memory allocation is created and
220 /// - `old_layout` must match the `Layout` the allocation has been created with.
226 /// - the contents of the memory pointed to by `p` are preserved up to the lesser of the new
229 /// - when the return value is `Err(AllocError)`, then `ptr` is still valid.
236 ) -> Result<NonNull<[u8]>, AllocError>; in realloc()
242 /// - `ptr` must point to an existing and valid memory allocation created by this [`Allocator`];
243 /// if `old_layout` is zero-sized `p` does not need to be a pointer returned by this
245 /// - `layout` must match the `Layout` the allocation has been created with.
246 /// - The memory allocation at `ptr` must never again be read from or written to.
264 pub(crate) fn dangling_from_layout(layout: Layout) -> NonNull<u8> { in dangling_from_layout()
267 // SAFETY: `layout.align()` (and hence `ptr`) is guaranteed to be non-zero. in dangling_from_layout()