Skip to content

Commit

Permalink
net: sockets: choose SOCKETPAIR_HEAP when MEM_POOL enabled
Browse files Browse the repository at this point in the history
Don't check 'HEAP_MEM_POOL_SIZE != 0', as HEAP_MEM_POOL_SIZE might be 0,
but HEAP_MEM_POOL_ADD_SIZE_xxx is defined, which means the actual heap
size is not zero. So check KERNEL_MEM_POOL instead.

Signed-off-by: Maochen Wang <[email protected]>
  • Loading branch information
MaochenWang1 committed Dec 12, 2024
1 parent b6bfeac commit bef518c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/net/lib/sockets/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ config NET_SOCKETPAIR_BUFFER_SIZE

choice
prompt "Memory management for socketpair"
default NET_SOCKETPAIR_HEAP if HEAP_MEM_POOL_SIZE != 0
default NET_SOCKETPAIR_HEAP if KERNEL_MEM_POOL

config NET_SOCKETPAIR_STATIC
bool "Pre-allocate memory statically"
Expand Down

0 comments on commit bef518c

Please sign in to comment.