AWS IoT Device SDK C: Static Memory
Statically-allocated buffer pools
Return to main page ↑
Configuration

Configuration settings of the statically-allocated buffer pools.

Configuration settings are C pre-processor constants. They can be set with a #define in the config file (iot_config.h) or by using a compiler option such as -D in gcc. If a configuration setting is not defined, the library will use a "sensible" default value (unless otherwise noted). Because they are compile-time constants, a library must be rebuilt if a configuration setting is changed.

configpagemarker

IOT_MESSAGE_BUFFERS

The number of statically-allocated message buffers. This setting has no effect if IOT_STATIC_MEMORY_ONLY is 0.

Message buffers are fixed-size buffers used for strings, such as log messages or bytes transmitted over a network. Their size and number can be configured with the constants IOT_MESSAGE_BUFFERS (number) and IOT_MESSAGE_BUFFER_SIZE (size of each message buffer). Message buffers may be used by any library, and are analogous to the generic buffers allocated by malloc (though all message buffers are the same size).

Possible values: Any positive integer.
Default value (if undefined): 8

IOT_MESSAGE_BUFFER_SIZE

The size (in bytes) of each statically-allocated message buffer. This setting has no effect if IOT_STATIC_MEMORY_ONLY is 0.

Possible values: Any positive integer.
Default value (if undefined): 1024