mm: vmalloc: introduce array allocation functions
commit a8749a35 upstream. 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> Signed-off-by:
Alexander Ofitserov <oficerovas@altlinux.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading