Debug macros and functions for tracing memory usage for the malloc() and free() functions.
Can also be used to get information about both size and placement of the heap memory.
Macros | |
#define | Insert_label(name) __asm__ __volatile__ (STRINGZ(name)":"); |
This macro is used to insert labels into assembly output. More... | |
#define | Uc3_trace(debug_addr, x) |
#define | Uc3_trace_init(debug_addr) *(U32*)(debug_addr)=debug_addr+4 |
These macros are used to add traces memory. More... | |
Functions | |
U32 | get_heap_curr_used_size (void) |
Returns the number of bytes currently used from the HEAP. More... | |
U32 | get_heap_free_size (void) |
Returns the number of free bytes in the HEAP. More... | |
U32 | get_heap_total_used_size (void) |
Returns the number of total of used bytes allocated from the HEAP. More... | |
Traces function using a round buffer | |
void | uc3_round_trace_init (void *buf, U32 size) |
Initialize the trace using a round buffer. More... | |
void | uc3_round_trace (U32 val) |
Trace a data in the round buffer. More... | |
#define Insert_label | ( | name | ) | __asm__ __volatile__ (STRINGZ(name)":"); |
This macro is used to insert labels into assembly output.
#define Uc3_trace | ( | debug_addr, | |
x | |||
) |
#define Uc3_trace_init | ( | debug_addr | ) | *(U32*)(debug_addr)=debug_addr+4 |
These macros are used to add traces memory.
First, initialize the trace with Uc3_trace_init(pointer), giving the start address of the memory location where will be stored the trace. Use Uc3_trace(something) to store "something" into the memory. The end of the trace is signalled by the "0xdeadbeef" pattern.
U32 get_heap_curr_used_size | ( | void | ) |
Returns the number of bytes currently used from the HEAP.
total | number of used bytes. |
Referenced by mmi_activity_display().
U32 get_heap_free_size | ( | void | ) |
Returns the number of free bytes in the HEAP.
This function tries to allocate the maximum number of bytes by dichotomical method.
number | of free bytes. |
Referenced by mmi_activity_display().
U32 get_heap_total_used_size | ( | void | ) |
Returns the number of total of used bytes allocated from the HEAP.
total | number of used bytes. |
Referenced by mmi_activity_display().
void uc3_round_trace | ( | U32 | val | ) |
Trace a data in the round buffer.
The end of the trace is signalled by the "0xdeadbeef" pattern.
val | Data to trace; |
References round_trace_pbuf.
void uc3_round_trace_init | ( | void * | buf, |
U32 | size | ||
) |
Initialize the trace using a round buffer.
buf | Base address of the buffer used for the trace. |
size | Size of the round buffer. Must be a power of 2. |