getMaxUsedStack() - stack usage reseach mini progress
This commit is contained in:
parent
6e57cae396
commit
214d65b8b5
|
@ -44,11 +44,13 @@ int getMaxUsedStack(uint8_t *ptr, int size) {
|
|||
/**
|
||||
* maximum used stack size total stack buffer size minus position of first modified byte
|
||||
*/
|
||||
#if ! EFI_UNIT_TEST
|
||||
int used = 0;
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (ptr[i] != CH_DBG_STACK_FILL_VALUE) {
|
||||
return size - i;
|
||||
}
|
||||
}
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue