]> git.baikalelectronics.ru Git - kernel.git/commit
mm: vmalloc: introduce array allocation functions
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 Mar 2022 09:47:22 +0000 (04:47 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 Mar 2022 14:30:17 +0000 (09:30 -0500)
commite1c178ae0a9cddf43ad58cbe2c3a3eade57eee77
treea740fb2b8147430dafef1e70e7c0ebbe4c897f38
parentc5ced42300e775cb50bafb1a9d2c2136245f31c3
mm: vmalloc: introduce array allocation functions

Linux has dozens of occurrences of vmalloc(array_size()) and
vzalloc(array_size()).  Allow to simplify the code by providing
vmalloc_array and vcalloc, as well as the underscored variants that let
the caller specify the GFP flags.

Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/linux/vmalloc.h
mm/util.c