File tree 14 files changed +98
-14
lines changed
14 files changed +98
-14
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ void * pvPortMalloc( size_t xWantedSize )
256
256
BlockLink_t * pxNewBlockLink ;
257
257
void * pvReturn = NULL ;
258
258
size_t xAdditionalRequiredSize ;
259
+ size_t xAllocatedBlockSize = 0 ;
259
260
260
261
/* If this is the first call to malloc then the heap will require
261
262
* initialisation to setup the list of free blocks. */
@@ -374,6 +375,8 @@ void * pvPortMalloc( size_t xWantedSize )
374
375
mtCOVERAGE_TEST_MARKER ();
375
376
}
376
377
378
+ xAllocatedBlockSize = pxBlock -> xBlockSize ;
379
+
377
380
/* The block is being returned - it is allocated and owned by
378
381
* the application and has no "next" block. */
379
382
secureheapALLOCATE_BLOCK ( pxBlock );
@@ -394,7 +397,10 @@ void * pvPortMalloc( size_t xWantedSize )
394
397
mtCOVERAGE_TEST_MARKER ();
395
398
}
396
399
397
- traceMALLOC ( pvReturn , xWantedSize );
400
+ traceMALLOC ( pvReturn , xAllocatedBlockSize );
401
+
402
+ /* Prevent compiler warnings when trace macros are not used. */
403
+ ( void ) xAllocatedBlockSize ;
398
404
399
405
#if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 )
400
406
{
Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ void * pvPortMalloc( size_t xWantedSize )
256
256
BlockLink_t * pxNewBlockLink ;
257
257
void * pvReturn = NULL ;
258
258
size_t xAdditionalRequiredSize ;
259
+ size_t xAllocatedBlockSize = 0 ;
259
260
260
261
/* If this is the first call to malloc then the heap will require
261
262
* initialisation to setup the list of free blocks. */
@@ -374,6 +375,8 @@ void * pvPortMalloc( size_t xWantedSize )
374
375
mtCOVERAGE_TEST_MARKER ();
375
376
}
376
377
378
+ xAllocatedBlockSize = pxBlock -> xBlockSize ;
379
+
377
380
/* The block is being returned - it is allocated and owned by
378
381
* the application and has no "next" block. */
379
382
secureheapALLOCATE_BLOCK ( pxBlock );
@@ -394,7 +397,10 @@ void * pvPortMalloc( size_t xWantedSize )
394
397
mtCOVERAGE_TEST_MARKER ();
395
398
}
396
399
397
- traceMALLOC ( pvReturn , xWantedSize );
400
+ traceMALLOC ( pvReturn , xAllocatedBlockSize );
401
+
402
+ /* Prevent compiler warnings when trace macros are not used. */
403
+ ( void ) xAllocatedBlockSize ;
398
404
399
405
#if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 )
400
406
{
Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ void * pvPortMalloc( size_t xWantedSize )
256
256
BlockLink_t * pxNewBlockLink ;
257
257
void * pvReturn = NULL ;
258
258
size_t xAdditionalRequiredSize ;
259
+ size_t xAllocatedBlockSize = 0 ;
259
260
260
261
/* If this is the first call to malloc then the heap will require
261
262
* initialisation to setup the list of free blocks. */
@@ -374,6 +375,8 @@ void * pvPortMalloc( size_t xWantedSize )
374
375
mtCOVERAGE_TEST_MARKER ();
375
376
}
376
377
378
+ xAllocatedBlockSize = pxBlock -> xBlockSize ;
379
+
377
380
/* The block is being returned - it is allocated and owned by
378
381
* the application and has no "next" block. */
379
382
secureheapALLOCATE_BLOCK ( pxBlock );
@@ -394,7 +397,10 @@ void * pvPortMalloc( size_t xWantedSize )
394
397
mtCOVERAGE_TEST_MARKER ();
395
398
}
396
399
397
- traceMALLOC ( pvReturn , xWantedSize );
400
+ traceMALLOC ( pvReturn , xAllocatedBlockSize );
401
+
402
+ /* Prevent compiler warnings when trace macros are not used. */
403
+ ( void ) xAllocatedBlockSize ;
398
404
399
405
#if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 )
400
406
{
Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ void * pvPortMalloc( size_t xWantedSize )
256
256
BlockLink_t * pxNewBlockLink ;
257
257
void * pvReturn = NULL ;
258
258
size_t xAdditionalRequiredSize ;
259
+ size_t xAllocatedBlockSize = 0 ;
259
260
260
261
/* If this is the first call to malloc then the heap will require
261
262
* initialisation to setup the list of free blocks. */
@@ -374,6 +375,8 @@ void * pvPortMalloc( size_t xWantedSize )
374
375
mtCOVERAGE_TEST_MARKER ();
375
376
}
376
377
378
+ xAllocatedBlockSize = pxBlock -> xBlockSize ;
379
+
377
380
/* The block is being returned - it is allocated and owned by
378
381
* the application and has no "next" block. */
379
382
secureheapALLOCATE_BLOCK ( pxBlock );
@@ -394,7 +397,10 @@ void * pvPortMalloc( size_t xWantedSize )
394
397
mtCOVERAGE_TEST_MARKER ();
395
398
}
396
399
397
- traceMALLOC ( pvReturn , xWantedSize );
400
+ traceMALLOC ( pvReturn , xAllocatedBlockSize );
401
+
402
+ /* Prevent compiler warnings when trace macros are not used. */
403
+ ( void ) xAllocatedBlockSize ;
398
404
399
405
#if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 )
400
406
{
Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ void * pvPortMalloc( size_t xWantedSize )
256
256
BlockLink_t * pxNewBlockLink ;
257
257
void * pvReturn = NULL ;
258
258
size_t xAdditionalRequiredSize ;
259
+ size_t xAllocatedBlockSize = 0 ;
259
260
260
261
/* If this is the first call to malloc then the heap will require
261
262
* initialisation to setup the list of free blocks. */
@@ -374,6 +375,8 @@ void * pvPortMalloc( size_t xWantedSize )
374
375
mtCOVERAGE_TEST_MARKER ();
375
376
}
376
377
378
+ xAllocatedBlockSize = pxBlock -> xBlockSize ;
379
+
377
380
/* The block is being returned - it is allocated and owned by
378
381
* the application and has no "next" block. */
379
382
secureheapALLOCATE_BLOCK ( pxBlock );
@@ -394,7 +397,10 @@ void * pvPortMalloc( size_t xWantedSize )
394
397
mtCOVERAGE_TEST_MARKER ();
395
398
}
396
399
397
- traceMALLOC ( pvReturn , xWantedSize );
400
+ traceMALLOC ( pvReturn , xAllocatedBlockSize );
401
+
402
+ /* Prevent compiler warnings when trace macros are not used. */
403
+ ( void ) xAllocatedBlockSize ;
398
404
399
405
#if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 )
400
406
{
Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ void * pvPortMalloc( size_t xWantedSize )
256
256
BlockLink_t * pxNewBlockLink ;
257
257
void * pvReturn = NULL ;
258
258
size_t xAdditionalRequiredSize ;
259
+ size_t xAllocatedBlockSize = 0 ;
259
260
260
261
/* If this is the first call to malloc then the heap will require
261
262
* initialisation to setup the list of free blocks. */
@@ -374,6 +375,8 @@ void * pvPortMalloc( size_t xWantedSize )
374
375
mtCOVERAGE_TEST_MARKER ();
375
376
}
376
377
378
+ xAllocatedBlockSize = pxBlock -> xBlockSize ;
379
+
377
380
/* The block is being returned - it is allocated and owned by
378
381
* the application and has no "next" block. */
379
382
secureheapALLOCATE_BLOCK ( pxBlock );
@@ -394,7 +397,10 @@ void * pvPortMalloc( size_t xWantedSize )
394
397
mtCOVERAGE_TEST_MARKER ();
395
398
}
396
399
397
- traceMALLOC ( pvReturn , xWantedSize );
400
+ traceMALLOC ( pvReturn , xAllocatedBlockSize );
401
+
402
+ /* Prevent compiler warnings when trace macros are not used. */
403
+ ( void ) xAllocatedBlockSize ;
398
404
399
405
#if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 )
400
406
{
Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ void * pvPortMalloc( size_t xWantedSize )
256
256
BlockLink_t * pxNewBlockLink ;
257
257
void * pvReturn = NULL ;
258
258
size_t xAdditionalRequiredSize ;
259
+ size_t xAllocatedBlockSize = 0 ;
259
260
260
261
/* If this is the first call to malloc then the heap will require
261
262
* initialisation to setup the list of free blocks. */
@@ -374,6 +375,8 @@ void * pvPortMalloc( size_t xWantedSize )
374
375
mtCOVERAGE_TEST_MARKER ();
375
376
}
376
377
378
+ xAllocatedBlockSize = pxBlock -> xBlockSize ;
379
+
377
380
/* The block is being returned - it is allocated and owned by
378
381
* the application and has no "next" block. */
379
382
secureheapALLOCATE_BLOCK ( pxBlock );
@@ -394,7 +397,10 @@ void * pvPortMalloc( size_t xWantedSize )
394
397
mtCOVERAGE_TEST_MARKER ();
395
398
}
396
399
397
- traceMALLOC ( pvReturn , xWantedSize );
400
+ traceMALLOC ( pvReturn , xAllocatedBlockSize );
401
+
402
+ /* Prevent compiler warnings when trace macros are not used. */
403
+ ( void ) xAllocatedBlockSize ;
398
404
399
405
#if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 )
400
406
{
Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ void * pvPortMalloc( size_t xWantedSize )
256
256
BlockLink_t * pxNewBlockLink ;
257
257
void * pvReturn = NULL ;
258
258
size_t xAdditionalRequiredSize ;
259
+ size_t xAllocatedBlockSize = 0 ;
259
260
260
261
/* If this is the first call to malloc then the heap will require
261
262
* initialisation to setup the list of free blocks. */
@@ -374,6 +375,8 @@ void * pvPortMalloc( size_t xWantedSize )
374
375
mtCOVERAGE_TEST_MARKER ();
375
376
}
376
377
378
+ xAllocatedBlockSize = pxBlock -> xBlockSize ;
379
+
377
380
/* The block is being returned - it is allocated and owned by
378
381
* the application and has no "next" block. */
379
382
secureheapALLOCATE_BLOCK ( pxBlock );
@@ -394,7 +397,10 @@ void * pvPortMalloc( size_t xWantedSize )
394
397
mtCOVERAGE_TEST_MARKER ();
395
398
}
396
399
397
- traceMALLOC ( pvReturn , xWantedSize );
400
+ traceMALLOC ( pvReturn , xAllocatedBlockSize );
401
+
402
+ /* Prevent compiler warnings when trace macros are not used. */
403
+ ( void ) xAllocatedBlockSize ;
398
404
399
405
#if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 )
400
406
{
Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ void * pvPortMalloc( size_t xWantedSize )
256
256
BlockLink_t * pxNewBlockLink ;
257
257
void * pvReturn = NULL ;
258
258
size_t xAdditionalRequiredSize ;
259
+ size_t xAllocatedBlockSize = 0 ;
259
260
260
261
/* If this is the first call to malloc then the heap will require
261
262
* initialisation to setup the list of free blocks. */
@@ -374,6 +375,8 @@ void * pvPortMalloc( size_t xWantedSize )
374
375
mtCOVERAGE_TEST_MARKER ();
375
376
}
376
377
378
+ xAllocatedBlockSize = pxBlock -> xBlockSize ;
379
+
377
380
/* The block is being returned - it is allocated and owned by
378
381
* the application and has no "next" block. */
379
382
secureheapALLOCATE_BLOCK ( pxBlock );
@@ -394,7 +397,10 @@ void * pvPortMalloc( size_t xWantedSize )
394
397
mtCOVERAGE_TEST_MARKER ();
395
398
}
396
399
397
- traceMALLOC ( pvReturn , xWantedSize );
400
+ traceMALLOC ( pvReturn , xAllocatedBlockSize );
401
+
402
+ /* Prevent compiler warnings when trace macros are not used. */
403
+ ( void ) xAllocatedBlockSize ;
398
404
399
405
#if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 )
400
406
{
Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ void * pvPortMalloc( size_t xWantedSize )
256
256
BlockLink_t * pxNewBlockLink ;
257
257
void * pvReturn = NULL ;
258
258
size_t xAdditionalRequiredSize ;
259
+ size_t xAllocatedBlockSize = 0 ;
259
260
260
261
/* If this is the first call to malloc then the heap will require
261
262
* initialisation to setup the list of free blocks. */
@@ -374,6 +375,8 @@ void * pvPortMalloc( size_t xWantedSize )
374
375
mtCOVERAGE_TEST_MARKER ();
375
376
}
376
377
378
+ xAllocatedBlockSize = pxBlock -> xBlockSize ;
379
+
377
380
/* The block is being returned - it is allocated and owned by
378
381
* the application and has no "next" block. */
379
382
secureheapALLOCATE_BLOCK ( pxBlock );
@@ -394,7 +397,10 @@ void * pvPortMalloc( size_t xWantedSize )
394
397
mtCOVERAGE_TEST_MARKER ();
395
398
}
396
399
397
- traceMALLOC ( pvReturn , xWantedSize );
400
+ traceMALLOC ( pvReturn , xAllocatedBlockSize );
401
+
402
+ /* Prevent compiler warnings when trace macros are not used. */
403
+ ( void ) xAllocatedBlockSize ;
398
404
399
405
#if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 )
400
406
{
Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ void * pvPortMalloc( size_t xWantedSize )
256
256
BlockLink_t * pxNewBlockLink ;
257
257
void * pvReturn = NULL ;
258
258
size_t xAdditionalRequiredSize ;
259
+ size_t xAllocatedBlockSize = 0 ;
259
260
260
261
/* If this is the first call to malloc then the heap will require
261
262
* initialisation to setup the list of free blocks. */
@@ -374,6 +375,8 @@ void * pvPortMalloc( size_t xWantedSize )
374
375
mtCOVERAGE_TEST_MARKER ();
375
376
}
376
377
378
+ xAllocatedBlockSize = pxBlock -> xBlockSize ;
379
+
377
380
/* The block is being returned - it is allocated and owned by
378
381
* the application and has no "next" block. */
379
382
secureheapALLOCATE_BLOCK ( pxBlock );
@@ -394,7 +397,10 @@ void * pvPortMalloc( size_t xWantedSize )
394
397
mtCOVERAGE_TEST_MARKER ();
395
398
}
396
399
397
- traceMALLOC ( pvReturn , xWantedSize );
400
+ traceMALLOC ( pvReturn , xAllocatedBlockSize );
401
+
402
+ /* Prevent compiler warnings when trace macros are not used. */
403
+ ( void ) xAllocatedBlockSize ;
398
404
399
405
#if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 )
400
406
{
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ void * pvPortMalloc( size_t xWantedSize )
160
160
BlockLink_t * pxNewBlockLink ;
161
161
void * pvReturn = NULL ;
162
162
size_t xAdditionalRequiredSize ;
163
+ size_t xAllocatedBlockSize = 0 ;
163
164
164
165
if ( xWantedSize > 0 )
165
166
{
@@ -261,6 +262,8 @@ void * pvPortMalloc( size_t xWantedSize )
261
262
262
263
xFreeBytesRemaining -= pxBlock -> xBlockSize ;
263
264
265
+ xAllocatedBlockSize = pxBlock -> xBlockSize ;
266
+
264
267
/* The block is being returned - it is allocated and owned
265
268
* by the application and has no "next" block. */
266
269
heapALLOCATE_BLOCK ( pxBlock );
@@ -269,7 +272,10 @@ void * pvPortMalloc( size_t xWantedSize )
269
272
}
270
273
}
271
274
272
- traceMALLOC ( pvReturn , xWantedSize );
275
+ traceMALLOC ( pvReturn , xAllocatedBlockSize );
276
+
277
+ /* Prevent compiler warnings when trace macros are not used. */
278
+ ( void ) xAllocatedBlockSize ;
273
279
}
274
280
( void ) xTaskResumeAll ();
275
281
Original file line number Diff line number Diff line change @@ -177,6 +177,7 @@ void * pvPortMalloc( size_t xWantedSize )
177
177
BlockLink_t * pxNewBlockLink ;
178
178
void * pvReturn = NULL ;
179
179
size_t xAdditionalRequiredSize ;
180
+ size_t xAllocatedBlockSize = 0 ;
180
181
181
182
if ( xWantedSize > 0 )
182
183
{
@@ -302,6 +303,8 @@ void * pvPortMalloc( size_t xWantedSize )
302
303
mtCOVERAGE_TEST_MARKER ();
303
304
}
304
305
306
+ xAllocatedBlockSize = pxBlock -> xBlockSize ;
307
+
305
308
/* The block is being returned - it is allocated and owned
306
309
* by the application and has no "next" block. */
307
310
heapALLOCATE_BLOCK ( pxBlock );
@@ -323,7 +326,10 @@ void * pvPortMalloc( size_t xWantedSize )
323
326
mtCOVERAGE_TEST_MARKER ();
324
327
}
325
328
326
- traceMALLOC ( pvReturn , xWantedSize );
329
+ traceMALLOC ( pvReturn , xAllocatedBlockSize );
330
+
331
+ /* Prevent compiler warnings when trace macros are not used. */
332
+ ( void ) xAllocatedBlockSize ;
327
333
}
328
334
( void ) xTaskResumeAll ();
329
335
You can’t perform that action at this time.
0 commit comments