aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2021-01-14 03:59:34 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2021-01-17 17:29:05 +0000
commit3b15beb30b3b4ba17bae3d1d43c8c04ff862bb57 (patch)
treecece9fd11c0237dbae35cf47b315aca5581b7d4c /sys/sys
parente83b514a9563d5812c9d158ff976f0de96bd90e0 (diff)
downloadsrc-3b15beb30b3b4ba17bae3d1d43c8c04ff862bb57.tar.gz
src-3b15beb30b3b4ba17bae3d1d43c8c04ff862bb57.zip
Implement malloc_domainset_aligned(9).
Change the power-of-two malloc zones to require alignment equal to the size [*]. Current uma allocator already provides such alignment, so in fact this change does not change anything except providing future-proof setup. Suggested by: markj [*] Reviewed by: andrew, jah, markj Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28147
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/malloc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h
index bf87e3168e01..a11dd767efc5 100644
--- a/sys/sys/malloc.h
+++ b/sys/sys/malloc.h
@@ -261,6 +261,9 @@ void *realloc(void *addr, size_t size, struct malloc_type *type, int flags)
__result_use_check __alloc_size(2);
void *reallocf(void *addr, size_t size, struct malloc_type *type, int flags)
__result_use_check __alloc_size(2);
+void *malloc_domainset_aligned(size_t size, size_t align,
+ struct malloc_type *mtp, struct domainset *ds, int flags)
+ __malloc_like __result_use_check __alloc_size(1);
struct malloc_type *malloc_desc2type(const char *desc);