Skip to content

Commit

Permalink
gnrc: some memory optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Nov 2, 2022
1 parent 6775836 commit 345f7c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sys/include/net/gnrc/pktbuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <string.h>

#include "cpu_conf.h"
#include "kernel_defines.h"
#include "mutex.h"
#include "net/gnrc/pkt.h"
#include "net/gnrc/neterr.h"
Expand All @@ -61,7 +62,11 @@ extern "C" {
* management to allocate packets.
*/
#ifndef CONFIG_GNRC_PKTBUF_SIZE
#define CONFIG_GNRC_PKTBUF_SIZE (6144)
# if !IS_USED(MODULE_GNRC_SCHC)
# define CONFIG_GNRC_PKTBUF_SIZE (6144)
# else
# define CONFIG_GNRC_PKTBUF_SIZE (4096) /* libSCHC uses its own buffers */
# endif
#endif
/** @} */

Expand Down
1 change: 1 addition & 0 deletions sys/net/gnrc/pktbuf/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if KCONFIG_USEMODULE_GNRC_PKTBUF_STATIC

config GNRC_PKTBUF_SIZE
int "Maximum size of the static packet buffer"
default 4096 if USEMODULE_GNRC_SCHC
default 6144
help
Set the value to 0 to allow dynamic memory management to allocate
Expand Down

0 comments on commit 345f7c6

Please sign in to comment.