From 4a5a75f32dcbcd0b2685f74fd4ede26edf8765a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Engel?= Date: Thu, 15 Mar 2012 15:05:12 -0400 Subject: target: Use array_zalloc for tpg_lun_list Turns an order-10 allocation into slab-sized ones, thereby preventing allocation failures with memory fragmentation. This likely saves memory as well, as the slab allocator can pack objects more tightly than the buddy allocator. Signed-off-by: Joern Engel Signed-off-by: Nicholas Bellinger --- include/target/target_core_backend.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/target/target_core_backend.h') diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index e5e6ff98f0fa..8c9ff1b14396 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h @@ -62,4 +62,6 @@ int transport_set_vpd_ident(struct t10_vpd *, unsigned char *); void *transport_kmap_data_sg(struct se_cmd *); void transport_kunmap_data_sg(struct se_cmd *); +void array_free(void *array, int n); + #endif /* TARGET_CORE_BACKEND_H */ -- cgit v1.2.3