Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.
Platforms to show: All Mac Windows Linux Cross-Platform
FAQ.How to get the current free stack space?
Answer: You can something like the code below:
Example:
Notes:
For Mac OS 9, use "ThreadLib" instead of "CarbonLib". You can use #if if you like for that.
Answer: You can something like the code below:
Example:
Sub ShowStackSize()
dim threadid as Integer
dim size as Integer
declare function GetCurrentThread lib "Carbon" (byref threadid as Integer) as short
declare function ThreadCurrentStackSpace lib "Carbon" (threadid as Integer, byref size as Integer) as short
if GetCurrentThread(threadid)=0 then
if 0=ThreadCurrentStackSpace(threadid,size) then
MsgBox str(size)
end if
end if
End Sub
Links
MBS Xojo Chart Plugins