Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133238955
D45282.id138830.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D45282.id138830.diff
View Options
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -562,24 +562,6 @@
/*
* Handle large allocations and frees by using kmem_malloc directly.
*/
-static inline bool
-malloc_large_slab(uma_slab_t slab)
-{
- uintptr_t va;
-
- va = (uintptr_t)slab;
- return ((va & 1) != 0);
-}
-
-static inline size_t
-malloc_large_size(uma_slab_t slab)
-{
- uintptr_t va;
-
- va = (uintptr_t)slab;
- return (va >> 1);
-}
-
static caddr_t __noinline
malloc_large(size_t size, struct malloc_type *mtp, struct domainset *policy,
int flags DEBUG_REDZONE_ARG_DEF)
diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h
--- a/sys/sys/malloc.h
+++ b/sys/sys/malloc.h
@@ -170,6 +170,7 @@
MALLOC_DECLARE(M_IOV);
struct domainset;
+struct uma_slab;
extern struct mtx malloc_mtx;
/*
@@ -286,6 +287,24 @@
nmemb > 0 && __SIZE_T_MAX / nmemb < size);
}
#undef MUL_NO_OVERFLOW
+
+static inline bool
+malloc_large_slab(struct uma_slab *slab)
+{
+ uintptr_t va;
+
+ va = (uintptr_t)slab;
+ return ((va & 1) != 0);
+}
+
+static inline size_t
+malloc_large_size(struct uma_slab *slab)
+{
+ uintptr_t va;
+
+ va = (uintptr_t)slab;
+ return (va >> 1);
+}
#endif /* _KERNEL */
#else
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 25, 5:50 AM (16 m, 49 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24163141
Default Alt Text
D45282.id138830.diff (1 KB)
Attached To
Mode
D45282: Move malloc_large_slab and malloc_large_size to malloc.h
Attached
Detach File
Event Timeline
Log In to Comment