Skip to content

Commit

Permalink
Fix nasa#59, remove unneeded stack object
Browse files Browse the repository at this point in the history
Remove the Initial dwell table object from MD_InitTableServices.
This object was not actually used, and consumed several kB of
stack space unnecessarily, depending on the size of the table.
  • Loading branch information
jphickey committed Dec 1, 2023
1 parent 7c7a544 commit 3bf8087
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions fsw/src/md_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,16 +328,11 @@ CFE_Status_t MD_InitTableServices(void)
uint8 TblIndex;
bool RecoveredValidTable = true; /* for current table */
bool TableInitValidFlag = true; /* for all tables so far*/
MD_DwellTableLoad_t InitMemDwellTable;
MD_DwellTableLoad_t *MD_LoadTablePtr = NULL;
uint16 TblRecos = 0; /* Number of Tables Recovered */
uint16 TblInits = 0; /* Number of Tables Initialized */
MD_DwellTableLoad_t *MD_LoadTablePtr = NULL;
uint16 TblRecos = 0; /* Number of Tables Recovered */
uint16 TblInits = 0; /* Number of Tables Initialized */
char TblFileName[OS_MAX_PATH_LEN];

/* Prepare Data Structure used for loading Initial Table Data */

memset(&InitMemDwellTable, 0, sizeof(InitMemDwellTable));

/*
** For each table, load recovered data if available and valid.
** Otherwise, load initial data.
Expand Down

0 comments on commit 3bf8087

Please sign in to comment.