Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2627, update check, docstr for max table sz #2632

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions cmake/sample_defs/example_platform_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1366,9 +1366,14 @@
** below when allocating memory for shared tables.
**
** \par Limits
** The cFE does not place a limit on the size of this parameter but it must be
** small enough to allow for #CFE_PLATFORM_TBL_MAX_SIMULTANEOUS_LOADS number of tables
** to fit into #CFE_PLATFORM_TBL_BUF_MEMORY_BYTES.
** The cFE does not place a limit on the size of this parameter but it
** must be at most small enough to allow for
** #CFE_PLATFORM_TBL_MAX_SIMULTANEOUS_LOADS number of tables to fit into
** #CFE_PLATFORM_TBL_BUF_MEMORY_BYTES. The actual value need to be
** smaller, as #CFE_PLATFORM_TBL_BUF_MEMORY_BYTES must be large enough to
** provide memory for each registered table, the inactive buffers for
** double buffered tables, and for the shared inactive buffers for single
** buffered tables.
*/
#define CFE_PLATFORM_TBL_MAX_SNGL_TABLE_SIZE 16384

Expand Down Expand Up @@ -1421,9 +1426,9 @@
** of shared buffers to allocate.
**
** \par Limits
** This number must be less than 32767. An excessively high number will
** degrade system performance and waste memory. A number less than 5 is
** suggested but not required.
** This number must be less than 32767 and greater than 0. An excessively
** high number will degrade system performance and waste memory. A number
** less than 5 is suggested but not required.
*/
#define CFE_PLATFORM_TBL_MAX_SIMULTANEOUS_LOADS 4

Expand Down
2 changes: 1 addition & 1 deletion modules/tbl/fsw/src/cfe_tbl_verify.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#error Two buffers of size CFE_PLATFORM_TBL_MAX_DBL_TABLE_SIZE cannot be greater than memory pool size of CFE_PLATFORM_TBL_BUF_MEMORY_BYTES!
#endif

#if ((CFE_PLATFORM_TBL_MAX_SIMULTANEOUS_LOADS + 1) * CFE_PLATFORM_TBL_MAX_SNGL_TABLE_SIZE) > \
#if (CFE_PLATFORM_TBL_MAX_SIMULTANEOUS_LOADS * CFE_PLATFORM_TBL_MAX_SNGL_TABLE_SIZE) > \
CFE_PLATFORM_TBL_BUF_MEMORY_BYTES
#error Shared buffers and table of size CFE_PLATFORM_TBL_MAX_SNGL_TABLE_SIZE cannot be greater than memory pool size of CFE_PLATFORM_TBL_BUF_MEMORY_BYTES!
#endif
Expand Down
Loading