Home
last modified time | relevance | path

Searched hist:ad443200b69711ad9dc30f32847b6a0d7e2bddf2 (Results 1 – 1 of 1) sorted by relevance

/optee_os/lib/libmbedtls/mbedtls/library/
H A Dbignum.cad443200b69711ad9dc30f32847b6a0d7e2bddf2 Mon May 27 14:42:58 UTC 2019 Jens Wiklander <jens.wiklander@linaro.org> libmbedtls: mbedtls_mpi_exp_mod(): optimize mempool usage

d5572fade852 ("libmbedtls: mbedtls_mpi_exp_mod(): optimize mempool
usage") from branch import/mbedtls-2.16.0

With W allocated in the mempool instead of the stack it is more important
to utilize the mempool in a stack like way.

With this patch allocation and initialization of W is moved to a point
where all following mempool allocations are free before the function
returns.

This reduces maximum memory consumption of mempool in regression case
8101 for an AArch64 TA in from 17280 to 7640 bytes. Figures for an
AArch32 TA are 12040 to 5288 bytes.

Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>