Skip to content

Commit 764885a

Browse files
Andres Amaya GarciaAndres Amaya Garcia
Andres Amaya Garcia
authored and
Andres Amaya Garcia
committed
benchmark: reduce size of tmp buffer to save memory
1 parent 1bd58ad commit 764885a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

benchmark/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,12 @@ void ecp_clear_precomputed(mbedtls_ecp_group *grp)
212212
#endif /* MBEDTLS_ECP_C */
213213

214214
static unsigned char buf[BUFSIZE];
215-
static unsigned char tmp[200];
215+
/*
216+
* Buffer used to hold various data such as IV, signatures, keys, etc. ECDSA
217+
* seems to be the benchmark that uses the most memory from this buffer as it
218+
* is holds the output signature
219+
*/
220+
static unsigned char tmp[150];
216221
/* The longest error message has 134 characters (including \0) */
217222
static char err_buf[134];
218223
static char title[TITLE_LEN];

0 commit comments

Comments
 (0)