Added stack size
svn-id: r11402
This commit is contained in:
parent
048e404cf1
commit
d44942b4f5
1 changed files with 19 additions and 1 deletions
|
@ -14,6 +14,13 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
static UInt32 GetStackSize() {
|
||||||
|
MemPtr startPP, endPP;
|
||||||
|
SysGetStackInfo(&startPP, &endPP);
|
||||||
|
|
||||||
|
return ((Char *)endPP - (Char *)startPP) / 1024L;
|
||||||
|
}
|
||||||
|
|
||||||
static void GetMemory(UInt32* storageMemoryP, UInt32* dynamicMemoryP, UInt32 *storageFreeP, UInt32 *dynamicFreeP) {
|
static void GetMemory(UInt32* storageMemoryP, UInt32* dynamicMemoryP, UInt32 *storageFreeP, UInt32 *dynamicFreeP) {
|
||||||
UInt32 free, max;
|
UInt32 free, max;
|
||||||
|
|
||||||
|
@ -66,10 +73,12 @@ static void GetMemory(UInt32* storageMemoryP, UInt32* dynamicMemoryP, UInt32 *st
|
||||||
static void SystemInfoFormInit() {
|
static void SystemInfoFormInit() {
|
||||||
FormPtr frmP;
|
FormPtr frmP;
|
||||||
Coord x;
|
Coord x;
|
||||||
UInt32 dm, sm, df, sf;
|
UInt32 dm, sm, df, sf, stack;
|
||||||
Char num[10];
|
Char num[10];
|
||||||
|
|
||||||
GetMemory(&sm, &dm, &sf, &df);
|
GetMemory(&sm, &dm, &sf, &df);
|
||||||
|
stack = GetStackSize();
|
||||||
|
|
||||||
frmP = FrmGetActiveForm();
|
frmP = FrmGetActiveForm();
|
||||||
FrmDrawForm(frmP);
|
FrmDrawForm(frmP);
|
||||||
|
|
||||||
|
@ -84,6 +93,10 @@ static void SystemInfoFormInit() {
|
||||||
x = 149 - FntCharsWidth(num, StrLen(num));
|
x = 149 - FntCharsWidth(num, StrLen(num));
|
||||||
WinDrawChars(num, StrLen(num), x, 42);
|
WinDrawChars(num, StrLen(num), x, 42);
|
||||||
|
|
||||||
|
StrIToA(num, stack);
|
||||||
|
x = 149 - FntCharsWidth(num, StrLen(num));
|
||||||
|
WinDrawChars(num, StrLen(num), x, 54);
|
||||||
|
|
||||||
StrIToA(num, df);
|
StrIToA(num, df);
|
||||||
x = 109 - FntCharsWidth(num, StrLen(num));
|
x = 109 - FntCharsWidth(num, StrLen(num));
|
||||||
WinDrawChars(num, StrLen(num), x, 30);
|
WinDrawChars(num, StrLen(num), x, 30);
|
||||||
|
@ -91,6 +104,11 @@ static void SystemInfoFormInit() {
|
||||||
StrIToA(num, sf);
|
StrIToA(num, sf);
|
||||||
x = 109 - FntCharsWidth(num, StrLen(num));
|
x = 109 - FntCharsWidth(num, StrLen(num));
|
||||||
WinDrawChars(num, StrLen(num), x, 42);
|
WinDrawChars(num, StrLen(num), x, 42);
|
||||||
|
|
||||||
|
StrCopy(num,"-");
|
||||||
|
x = 109 - FntCharsWidth(num, StrLen(num));
|
||||||
|
WinDrawChars(num, StrLen(num), x, 54);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Boolean SystemInfoFormHandleEvent(EventPtr eventP) {
|
Boolean SystemInfoFormHandleEvent(EventPtr eventP) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue