wolfssl-examples/staticmemory
Devin AI 592e088800 Add memory bucket optimizer tool
This commit adds a tool to analyze memory allocation patterns from wolfSSL
operations and recommend optimal static memory bucket configurations to
minimize wasted memory. The tool includes:

- Memory bucket optimizer that analyzes allocation logs
- Example application demonstrating optimized bucket usage
- Visualization scripts using gnuplot
- Scripts to run optimization for different TLS operations

The tool helps users find optimal WOLFMEM_BUCKETS and WOLFMEM_DIST
configurations for their specific use cases.

Co-Authored-By: jacob@wolfssl.com <jacob@wolfssl.com>
2025-03-04 01:04:54 +00:00
..
memory-bucket-optimizer Add memory bucket optimizer tool 2025-03-04 01:04:54 +00:00
Makefile add debug callback function example 2024-08-06 17:02:58 -06:00
README.md add size calculation example for static memory 2024-08-06 16:36:35 -06:00
debug-callback-example.c add debug callback function example 2024-08-06 17:02:58 -06:00
size-calculation.c add size calculation example for static memory 2024-08-06 16:36:35 -06:00

README.md

Examples of using wolfSSL's simple memory allocator. Enabled with --enable-staticmemory or WOLFSSL_STATIC_MEMORY when building wolfSSL. This is not a feature to reduce memory size!! It in fact uses a little more memory overhead. The staticmemory feature is used to have a simple fixed pool of memory available instead of using a systems malloc/free calls. Helpful in cases where dynamic memory is not allowed.

wolfSSL has support for XMALLOC_USER which could be used to instead map XMALLOC and XFREE to any desired implementation of malloc/free.