Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150655941
D45841.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
662 B
Referenced Files
None
Subscribers
None
D45841.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h
--- a/sys/compat/linuxkpi/common/include/linux/slab.h
+++ b/sys/compat/linuxkpi/common/include/linux/slab.h
@@ -237,6 +237,14 @@
return (malloc_usable_size(ptr));
}
+static inline size_t
+kmalloc_size_roundup(size_t size)
+{
+ if (unlikely(size == 0 || size == SIZE_MAX))
+ return (size);
+ return (malloc_size(size));
+}
+
extern struct linux_kmem_cache *linux_kmem_cache_create(const char *name,
size_t size, size_t align, unsigned flags, linux_kmem_ctor_t *ctor);
extern void *lkpi_kmem_cache_alloc(struct linux_kmem_cache *, gfp_t);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 3:39 AM (3 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30796106
Default Alt Text
D45841.diff (662 B)
Attached To
Mode
D45841: LinuxKPI: Add kmalloc_size_roundup function
Attached
Detach File
Event Timeline
Log In to Comment