Remove dynamic memory allocation (malloc/calloc/free)

- Add static memory pool implementation (se050_mem_pool.c/h)
- Replace all malloc/calloc with pool allocations
- Replace all free with pool deallocations
- Remove strdup usage (use fixed-size buffer instead)
- Update I2C HAL to use fixed-size dev_path array
- All 24 tests pass with static memory only

Suitable for embedded environments (u-boot, ESP32) without heap.
This commit is contained in:
km
2026-03-29 19:07:57 +09:00
parent 479fcd37c1
commit 11bcc5e0c3
11 changed files with 447 additions and 79 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ AR = ar
CFLAGS = -Wall -Wextra -std=c11 -I include
LDFLAGS =
SRCS = src/se050_i2c_hal.c src/se050_session.c src/se050_keystore.c \
SRCS = src/se050_i2c_hal.c src/se050_mem_pool.c src/se050_session.c src/se050_keystore.c \
src/se050_rng.c src/se050_x25519.c src/se050_x25519_sw.c \
src/se050_chacha20_poly1305.c src/se050_blake2s.c \
src/se050_hmac_blake2s.c src/se050_hkdf_blake2s.c src/se050_tai64n.c \