Skip to content

lib: nrf_provisioning: Add heap allocation option for HTTP buffers#38

Merged
dmitryalexeevemcraft merged 1 commit into
emcraft-v2.8.0-branchfrom
RT-1000-1169
Jun 20, 2026
Merged

lib: nrf_provisioning: Add heap allocation option for HTTP buffers#38
dmitryalexeevemcraft merged 1 commit into
emcraft-v2.8.0-branchfrom
RT-1000-1169

Conversation

@dmitryalexeevemcraft

@dmitryalexeevemcraft dmitryalexeevemcraft commented Jun 18, 2026

Copy link
Copy Markdown

Add CONFIG_NRF_PROVISIONING_USE_KMALLOC to allocate provisioning HTTP RX/TX buffers and codec data from the kernel heap instead of reserving them as permanent static memory.

This reduces static RAM usage by allocating the buffers only during a provisioning exchange and freeing them afterwards. The tradeoff is that the heap must be large enough to hold RX_BUF_SZ + TX_BUF_SZ and other
concurrent allocations.

Reuse the existing pointer-based codec layout used by USE_MALLOC; only the allocator differs (k_malloc/k_free vs malloc/free).

Signed-off-by: Dmitry Alexeev <dmitry.alexeev@emcraft.com>
@dmitryalexeevemcraft dmitryalexeevemcraft merged commit 92bc78f into emcraft-v2.8.0-branch Jun 20, 2026
@dmitryalexeevemcraft dmitryalexeevemcraft deleted the RT-1000-1169 branch June 22, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants