mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-17 07:12:06 +08:00
Remove CONFIG_CAN_PASS_STRUCT
This is the companion to PR #766. It removes the CONFIG_CAN_PASS_STRUCT option as recommended by Issue #620 NuttX PR #766 depends on PR being in place but not vice versa. This PR should be merge-able without #766 and then PR #766 should also pass its checks.
This commit is contained in:

committed by
Abdelatif Guettouche

parent
95efbf7e62
commit
05f2253a33
@@ -176,11 +176,7 @@ static void configdata_loopmemusage(void)
|
||||
{
|
||||
/* Get the current memory usage */
|
||||
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
g_mmafter = mallinfo();
|
||||
#else
|
||||
mallinfo(&g_mmafter);
|
||||
#endif
|
||||
|
||||
/* Show the change from the previous loop */
|
||||
|
||||
@@ -189,11 +185,7 @@ static void configdata_loopmemusage(void)
|
||||
|
||||
/* Set up for the next test */
|
||||
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
g_mmprevious = g_mmafter;
|
||||
#else
|
||||
memcpy(&g_mmprevious, &g_mmafter, sizeof(struct mallinfo));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -203,11 +195,8 @@ static void configdata_loopmemusage(void)
|
||||
|
||||
static void configdata_endmemusage(void)
|
||||
{
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
g_mmafter = mallinfo();
|
||||
#else
|
||||
mallinfo(&g_mmafter);
|
||||
#endif
|
||||
|
||||
printf("\nFinal memory usage:\n");
|
||||
configdata_showmemusage(&g_mmbefore, &g_mmafter);
|
||||
|
||||
@@ -679,11 +668,7 @@ int main(int argc, FAR char *argv[])
|
||||
|
||||
/* Initialize the before memory values */
|
||||
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
g_mmbefore = mallinfo();
|
||||
#else
|
||||
mallinfo(&g_mmbefore);
|
||||
#endif
|
||||
|
||||
/* Loop seveal times ... create some config data items, delete them
|
||||
* randomly, verify them randomly, add new config items.
|
||||
|
Reference in New Issue
Block a user