Skip to content

Commit f8fdd02

Browse files
committed
Skip heap_3.c functions if no configSUPPORT_DYNAMIC_ALLOCATION
1 parent 1565962 commit f8fdd02

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/heap_3.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,7 @@ task.h is included from an application file. */
9191

9292
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
9393

94-
#if( configSUPPORT_DYNAMIC_ALLOCATION == 0 )
95-
#error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0
96-
#endif
97-
94+
#if( configSUPPORT_DYNAMIC_ALLOCATION > 0 )
9895
/*-----------------------------------------------------------*/
9996

10097
void *pvPortMalloc( size_t xWantedSize )
@@ -135,5 +132,6 @@ void vPortFree( void *pv )
135132
}
136133
}
137134

135+
#endif /* ( configSUPPORT_DYNAMIC_ALLOCATION > 0 ) */
138136

139137

0 commit comments

Comments
 (0)