qcacmn: Replace kzalloc/kfree with vmalloc/vfree for cfg value store
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 one will be refined to replace malloc with valloc when CONFIG_ENABLE_VALLOC_REPLACE_MALLOC=y. 1 x 21552 = 21552B@cfg_store_alloc:448 Change-Id: Ic43901453e8194d4f7fc0f8af2e2459bea5495a6 CRs-Fixed: 3426968
Šī revīzija ir iekļauta:

revīziju iesūtīja
Madan Koyyalamudi

vecāks
b7987d7b29
revīzija
6f3a375902
@@ -445,7 +445,7 @@ cfg_store_alloc(const char *path, struct cfg_value_store **out_store)
|
|||||||
|
|
||||||
cfg_enter();
|
cfg_enter();
|
||||||
|
|
||||||
store = qdf_mem_malloc(sizeof(*store));
|
store = qdf_mem_common_alloc(sizeof(*store));
|
||||||
if (!store)
|
if (!store)
|
||||||
return QDF_STATUS_E_NOMEM;
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
|
||||||
@@ -472,7 +472,7 @@ free_path:
|
|||||||
qdf_mem_free(store->path);
|
qdf_mem_free(store->path);
|
||||||
|
|
||||||
free_store:
|
free_store:
|
||||||
qdf_mem_free(store);
|
qdf_mem_common_free(store);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@@ -491,7 +491,7 @@ static void cfg_store_free(struct cfg_value_store *store)
|
|||||||
status);
|
status);
|
||||||
|
|
||||||
qdf_mem_free(store->path);
|
qdf_mem_free(store->path);
|
||||||
qdf_mem_free(store);
|
qdf_mem_common_free(store);
|
||||||
}
|
}
|
||||||
|
|
||||||
static QDF_STATUS
|
static QDF_STATUS
|
||||||
|
Atsaukties uz šo jaunā problēmā
Block a user