]> git.sur5r.net Git - freertos/commitdiff
Added a call to vApplicationMallocFailedHook() when pvPortMalloc() returns NULL.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 21 Jul 2009 17:25:55 +0000 (17:25 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 21 Jul 2009 17:25:55 +0000 (17:25 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@820 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/portable/MemMang/heap_1.c
Source/portable/MemMang/heap_2.c
Source/portable/MemMang/heap_3.c

index 3e32fc013391bc7fa6bd9b6f507f36b0ea20502c..1829d8a11bddf858094ada72f43f37129be3a8f1 100644 (file)
@@ -120,6 +120,16 @@ void *pvReturn = NULL;
                }       \r
        }\r
        xTaskResumeAll();\r
+       \r
+       #if( configUSE_MALLOC_FAILED_HOOK == 1 )\r
+       {\r
+               if( pvReturn == NULL )\r
+               {\r
+                       extern void vApplicationMallocFailedHook( void );\r
+                       vApplicationMallocFailedHook();\r
+               }\r
+       }\r
+       #endif  \r
 \r
        return pvReturn;\r
 }\r
index 7665f6904e7a2226cd6728c0f6d6e2a7ddd8c420..b15c38467746121b5c13e30beeadc47d01086822 100644 (file)
@@ -230,6 +230,16 @@ void *pvReturn = NULL;
        }\r
        xTaskResumeAll();\r
 \r
+       #if( configUSE_MALLOC_FAILED_HOOK == 1 )\r
+       {\r
+               if( pvReturn == NULL )\r
+               {\r
+                       extern void vApplicationMallocFailedHook( void );\r
+                       vApplicationMallocFailedHook();\r
+               }\r
+       }\r
+       #endif\r
+       \r
        return pvReturn;\r
 }\r
 /*-----------------------------------------------------------*/\r
index 6389783c53efe3dd96fddd81b2e525aa527781c6..763d0402ddcde293c4ae615bb22799150f04e1d0 100644 (file)
@@ -74,6 +74,16 @@ void *pvReturn;
        }\r
        xTaskResumeAll();\r
 \r
+       #if( configUSE_MALLOC_FAILED_HOOK == 1 )\r
+       {\r
+               if( pvReturn == NULL )\r
+               {\r
+                       extern void vApplicationMallocFailedHook( void );\r
+                       vApplicationMallocFailedHook();\r
+               }\r
+       }\r
+       #endif\r
+       \r
        return pvReturn;\r
 }\r
 /*-----------------------------------------------------------*/\r