mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 21:12:43 +00:00
Add support for large (> PAGE_SIZE) alignments in Rust allocators. All the preparations on the C side are already done, we just need to add bindings for <alloc>_node_align() functions and start using those. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Vitaly Wool <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Acked-by: Alice Ryhl <[email protected]> Cc: Herbert Xu <[email protected]> Cc: Jann Horn <[email protected]> Cc: Kent Overstreet <[email protected]> Cc: Liam Howlett <[email protected]> Cc: Lorenzo Stoakes <[email protected]> Cc: Uladzislau Rezki (Sony) <[email protected]> Cc: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
18 lines
496 B
C
18 lines
496 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#include <linux/slab.h>
|
|
|
|
void * __must_check __realloc_size(2)
|
|
rust_helper_krealloc_node_align(const void *objp, size_t new_size, unsigned long align,
|
|
gfp_t flags, int node)
|
|
{
|
|
return krealloc_node_align(objp, new_size, align, flags, node);
|
|
}
|
|
|
|
void * __must_check __realloc_size(2)
|
|
rust_helper_kvrealloc_node_align(const void *p, size_t size, unsigned long align,
|
|
gfp_t flags, int node)
|
|
{
|
|
return kvrealloc_node_align(p, size, align, flags, node);
|
|
}
|