What i need is to know, is how much of stack size exactly programm use on running. I know there is stack cookies, i know that there is stack command, and i know that workbench have some default stack size, but what i need its something more low-level, which can show how much stack exactly my binary takes.
Like some window, where is list of binaries, and on which i can see how much stack size it takes on running.
Maybe it possible to see via ranger or snoopy or kind ?
Question #2:
Is stackcookie supposed to work with something like this:
What i mean there is that "2*1024*1024" will calculate the size normally or not ? Seems when i use just 2097152 , then all is ok, but if use it like 2*1024*1024 then its seems like stack size sets as very small one, and not calculates as 2097152.
I don't know for sure but I doubt DOS will evaluate the cookie stack string and do the calculus. Maybe you can use preprocessor stringification operator.
EDIT: oh and for #1 you can calculate by yourself the maximum stack size a program will take. All other methods will be the *observed* maximum on a given session using a given set of data, which might or might not be the real theoretical maximum.
I don't know for sure but I doubt DOS will evaluate the cookie stack string and do the calculus. Maybe you can use preprocessor stringification operator.
Seems that its indeed didn't calculates when i write it like this.
Quote:
EDIT: oh and for #1 you can calculate by yourself the maximum stack size a program will take. All other methods will be the *observed* maximum on a given session using a given set of data, which might or might not be the real theoretical maximum.
mm.. the point of that question, is because of the first question as well : i.e., i write a stackcookie which should calculate, but it didn't, or did, but in some manner. So, i just want to see how much of stack space my binary set after running. 2, or 2*1024, or its like 2something1024something1024, or just nothing.
Pure technical interest. I.e. not how much i need, but how much my cookie set exactly when i write some trash in it, and how it reacts.
Thanks ! Thats exactly what i asked for ! Super tool: tiny, small, show how much stack allocated by which task/process, can update list in realtime, can save the content of stack to the file and so on and so on. True amiga stuff :) Something like this will be good to have in native. I do not know if it worth to try to contact with author after 13 years since his latest release of it, but why not try..
kas1e wrote: mm.. the point of that question, is because of the first question as well : i.e., i write a stackcookie which should calculate, but it didn't, or did, but in some manner. So, i just want to see how much of stack space my binary set after running. 2, or 2*1024, or its like 2something1024something1024, or just nothing.
Pure technical interest. I.e. not how much i need, but how much my cookie set exactly when i write some trash in it, and how it reacts.
My guess would be that in case the stack cookie can not be interpreted it would stay at the configured system default value.
I was just emphasizing that unless you are using recursion the maximum stack usage can be calculated. All other method is just an approximation based on observation of a run. The result may or may not be accurate and more importantly may not be enough.
What i mean there is that "2*1024*1024" will calculate the size normally or not ? Seems when i use just 2097152 , then all is ok, but if use it like 2*1024*1024 then its seems like stack size sets as very small one, and not calculates as 2097152.
If you want to write the stack size as 2 * 1024 * 1024 in your source-code, then try something like this:
If it would help, I can provide some code to show the current & total stack size of the program itself?
Better if you can write on portable the same StackSnoop :) I assume should be more or less easy for you as you have gui module already + stack related code.
Better if you can write on portable the same StackSnoop :) I assume should be more or less easy for you as you have gui module already + stack related code.
Code for reading the stack of other tasks is not as accurate as that for reading for your own program... but I thought your suggestion might be a nice "little" GUI example for PortablE, so I did it anyway:
But yep, gui feels a bit kludgy. All works, but just some bits here and here.
Imho its already worth of uploading to os4depot (which didn't have Development/Monitors). But maybe because of your programm it can be added. Will be bad to put it to other areas, as its for sure monitor, and for sure pretty usable and intersting already. All that RMB menus as in stacksnoop and co, can be or can be not added (if you have time , will be nice), but even in current form it do the work, looks and feels native, loads fast and size not very fat one (but still 0.5mb, and by strip i can't reduce it).
Is it easy via portable add RMB menu ? Just after i see the code, i found portable pretty good middle line of the easy programming (in compare with C/C++), and still a decent language which allow you to go deep to the system. It is possible to use hooks in portable to extend some components by users ?
Anyway, thanks, already in my work:devs/moni/
ps. Btw, found a good difference in compare with StackSnoop: mouse wheel works in Stacker. But found also and a bit bad moment: when you run something from shell, and refresh the list, in lists its still shown like "shell process", while for example in stacksnoop, when you run something from shell, it will show in list "shell process: <name of bin>". So its kind of easy to detect.
Naah. IMHO it is just a proof-of-concept toy. It needs a bit of work to be really useful (especially the requested "max stack usage" monitoring).
Quote:
Is it easy via portable add RMB menu ?
Yes & no. I have my own private module which makes menus very easy (and you can see it in action in RunInUAE & especially PictureAlbum), but this has not yet been turned into something I wish to make publically available.
Quote:
when you run something from shell, and refresh the list, in lists its still shown like "shell process"
Yes, that is another obvious improvement.
Quote:
loads fast and size not very fat one
Well, executable size is not (currently) one of PortablE's strong points, but it's not so bad that I'm in any hurry to improve it either...
@ChrisH Sure, its need some love of course, but its really nice one and just deserve to be even in SDK once it will be polished. Such a nice/small but helpfull utilities should't die in the dust of forum posts.