uncrustify libraries/memcheck/memcheck.cpp

This commit is contained in:
uncrustify 2012-08-16 23:22:40 -07:00 committed by Pat Hickey
parent 7aa99f0752
commit 2bbf7f2768

View File

@ -1,8 +1,8 @@
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
/* /*
note that we use a 32 bit sentinel to reduce the chance * note that we use a 32 bit sentinel to reduce the chance
of false positives with uninitialised stack variables * of false positives with uninitialised stack variables
*/ */
#include <AP_Common.h> #include <AP_Common.h>
@ -14,7 +14,7 @@ extern unsigned __brkval;
#define SENTINEL 0x28021967 #define SENTINEL 0x28021967
/* /*
return the current stack pointer * return the current stack pointer
*/ */
static __attribute__((noinline)) const uint32_t *current_stackptr(void) static __attribute__((noinline)) const uint32_t *current_stackptr(void)
{ {
@ -22,9 +22,9 @@ static __attribute__((noinline)) const uint32_t *current_stackptr(void)
} }
/* /*
this can be added in deeply nested code to ensure we catch * this can be added in deeply nested code to ensure we catch
deep stack usage. It should be caught by the sentinel, but this * deep stack usage. It should be caught by the sentinel, but this
is an added protection * is an added protection
*/ */
void memcheck_update_stackptr(void) void memcheck_update_stackptr(void)
{ {
@ -35,7 +35,7 @@ void memcheck_update_stackptr(void)
} }
/* /*
initialise memcheck, setting up the sentinels * initialise memcheck, setting up the sentinels
*/ */
void memcheck_init(void) void memcheck_init(void)
{ {
@ -51,8 +51,8 @@ void memcheck_init(void)
} }
/* /*
this returns the real amount of free memory by looking for * this returns the real amount of free memory by looking for
overwrites of the stack sentinel values * overwrites of the stack sentinel values
*/ */
unsigned memcheck_available_memory(void) unsigned memcheck_available_memory(void)
{ {