qcacmn: Replace kzalloc/kfree with vmalloc/vfree
At continuous physical address limited telematics platform, in order to avoid occasional memory alloc failure with big kzalloc size, it's better to use virtual memory allocation API instead. And below items will be refined to replace malloc with valloc if CONFIG_ENABLE_VALLOC_REPLACE_MALLOC=y. 1 x 30488 = 30488B @dp_soc_attach:15189 1 x 52096 = 52096B @hal_attach:1104 4096 x 64 = 262144B @dp_rx_desc_pool_alloc:337 Change-Id: I57a6f78f690b5be1838de954933ae36129cea234 CRs-Fixed: 3426935
This commit is contained in:

committed by
Madan Koyyalamudi

parent
a3a4e67eed
commit
ddabd3eda4
@@ -6511,7 +6511,7 @@ static void dp_soc_detach(struct cdp_soc_t *txrx_soc)
|
||||
}
|
||||
|
||||
qdf_mem_free(soc->cdp_soc.ops);
|
||||
qdf_mem_free(soc);
|
||||
qdf_mem_common_free(soc);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -15586,7 +15586,7 @@ dp_soc_attach(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
|
||||
goto fail0;
|
||||
}
|
||||
arch_id = cdp_get_arch_type_from_devid(device_id);
|
||||
soc = qdf_mem_malloc(dp_get_soc_context_size(device_id));
|
||||
soc = qdf_mem_common_alloc(dp_get_soc_context_size(device_id));
|
||||
if (!soc) {
|
||||
dp_err("DP SOC memory allocation failed");
|
||||
goto fail0;
|
||||
@@ -15713,7 +15713,7 @@ fail3:
|
||||
fail2:
|
||||
qdf_mem_free(soc->cdp_soc.ops);
|
||||
fail1:
|
||||
qdf_mem_free(soc);
|
||||
qdf_mem_common_free(soc);
|
||||
fail0:
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user