mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-30 07:44:21 +01:00
Add a macro to define the memory size in ssl_server2.c
When MBEDTLS_MEMORY_BUFFER_ALLOC_C was defined, the sample ssl_server2.c was using its own memory buffer for memory allocated by the library. The memory used wasn't obvious, so this adds a macro for the memory buffer allocated to make the allocated memory size more obvious and hence easier to configure.
This commit is contained in:
parent
e8c12f1ec9
commit
7458975805
@ -94,6 +94,10 @@ int main( void )
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Size of memory to be allocated for the heap, when using the library's memory
|
||||||
|
* management and MBEDTLS_MEMORY_BUFFER_ALLOC_C is enabled. */
|
||||||
|
#define MEMORY_HEAP_SIZE 120000
|
||||||
|
|
||||||
#define DFL_SERVER_ADDR NULL
|
#define DFL_SERVER_ADDR NULL
|
||||||
#define DFL_SERVER_PORT "4433"
|
#define DFL_SERVER_PORT "4433"
|
||||||
#define DFL_RESPONSE_SIZE -1
|
#define DFL_RESPONSE_SIZE -1
|
||||||
@ -887,7 +891,7 @@ int main( int argc, char *argv[] )
|
|||||||
const char *alpn_list[ALPN_LIST_SIZE];
|
const char *alpn_list[ALPN_LIST_SIZE];
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
|
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
|
||||||
unsigned char alloc_buf[120000];
|
unsigned char alloc_buf[MEMORY_HEAP_SIZE];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
Loading…
Reference in New Issue
Block a user