For Programmers: Free Programming Magazines  


Home > Archive > Clipper > February 2005 > Stacks & Heaps









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Stacks & Heaps
Mel Smith

2005-02-07, 3:55 am

Enviro: Win98SE and WinXP Pro & Blinker 5.1

Does anyone know of a few quick rules (or a tutorial) on how to use the
size parameter for both Stacks & Heaps ?

I went into the .hlp help file in Blinker5 -- but didn't get much
helpful info (except that the Stack holds function call returns).

It is very difficult for me (with a Win98SE machine) to set up an app
for a set of remote WinXP Pro machines when I don't know what I'm doing with
these 'size' parameters.

So, if I lower the size for the stack, then will that give more space
for the 'heap' ? -- but there is *no* Heap command for 16-bit DOS apps --
but there *is* a Heap Command for 16-bit proggies when one uses FiveWin ??
Crazy !!

So, before I go changing a bunch of these in my .lnk script, it would be
nice to know what I'm doing :(((

-Mel Smith


clipperace

2005-02-08, 3:55 am

So, before I go changing a bunch of these in my .lnk script, it would be
nice to know what I'm doing :(((

-Mel Smith


Why start now?????

Seriously, I am trying to remember if you can view the stack and/or heap
with a linked in MRDEBUG. Anyone know? I am not near a copy so can't tell
right now.

Mike


Dave Pearson

2005-02-08, 3:55 pm

* clipperace <mdhall2@cox.net>:

> Seriously, I am trying to remember if you can view the stack and/or heap
> with a linked in MRDEBUG. Anyone know? I am not near a copy so can't tell
> right now.


From MrDebug's main menu do View>>Memory/Info and you'll get a map DGROUP
(plus a load of other information, some relating to memory). Is that what
you're after?

--
Dave Pearson | OSLib - Timeslice release functions.
http://www.davep.org/ | eg - Norton Guide reader for Linux.
http://www.davep.org/clipper/ | weg - Norton Guide reader for Windows.
http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper.
clipperace

2005-02-08, 3:55 pm

Thanks Dave. That's what I was refering to. Hope it's what Mel is looking
for.

Mike

"Dave Pearson" <davep.news@davep.org> wrote in message
news:slrnd0heu5.spn.davep.news@hagbard.davep.org...
> * clipperace <mdhall2@cox.net>:
>
tell[color=darkred]
>
> From MrDebug's main menu do View>>Memory/Info and you'll get a map DGROUP
> (plus a load of other information, some relating to memory). Is that what
> you're after?
>
> --
> Dave Pearson | OSLib - Timeslice release

functions.
> http://www.davep.org/ | eg - Norton Guide reader for

Linux.
> http://www.davep.org/clipper/ | weg - Norton Guide reader for

Windows.
> http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper.



Stephen Quinn

2005-02-09, 3:55 am

Mel

> Does anyone know of a few quick rules (or a tutorial) on how to use the
> size parameter for both Stacks & Heaps ?


Some libraries have the stack size hardwired in them
- SIXCDX does (IIRC 7168)
- IIRC COMIX does as well

> So, if I lower the size for the stack, then will that give more space
> for the 'heap' ? -- but there is *no* Heap command for 16-bit DOS apps --
> but there *is* a Heap Command for 16-bit proggies when one uses FiveWin ??

Probably the MM in FiveWin interfaces to (or is) the Windows MM that's where the
'heap' comes into it and really has no meaning in DOS.

MM = Memory Manager

--
HTH
Steve


Mel Smith

2005-02-09, 3:55 am

Mike,

I don't have MrDebug.

I would like to know the basics of stacks and heaps as they relate to
Clipper programs linked with Blinker 5.1

Antonio Linares provides a 'standard' fivewin.lnk with both Stacksize
and Heapsize parameters. What data/functions/vrbls are stored in each
please ??

-Mel Smith

"clipperace" <mdhall2@cox.net> wrote in message
news:as7Od.49952$bu.22798@fed1read06...
> Thanks Dave. That's what I was refering to. Hope it's what Mel is looking
> for.
>
> Mike
>
> "Dave Pearson" <davep.news@davep.org> wrote in message
> news:slrnd0heu5.spn.davep.news@hagbard.davep.org...
heap[color=darkred]
> tell
DGROUP[color=darkred]
what[color=darkred]
> functions.
> Linux.
> Windows.
Clipper.[color=darkred]
>
>



Dave Pearson

2005-02-09, 8:55 am

* Mel Smith <medsyntel@aol.com>:

> Antonio Linares provides a 'standard' fivewin.lnk with both Stacksize
> and Heapsize parameters. What data/functions/vrbls are stored in each
> please ??


Might <URL:http://www.davep.org/clipper/dgroup/> be of some help? There's
also another, and much "wider", document about CA-Clipper and memory kicking
around on the net although I can't recall the location. Perhaps a little
time spent with Google will turn it up for you?

--
Dave Pearson | OSLib - Timeslice release functions.
http://www.davep.org/ | eg - Norton Guide reader for Linux.
http://www.davep.org/clipper/ | weg - Norton Guide reader for Windows.
http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper.
Mel Smith

2005-02-10, 3:55 am

Dave & Stephen,

Thanks for your help. My concern with Stacks & Heaps is that the
settings appear to be arbitrary and a bit magical, and those settings are
(apparently) related to the likelihood of GPF crashes on WinXP machines. If
this is a false conclusion, then I'll probably just forget about it.

I thought somebody could say to me (and I'm fantasizing):
"Mel, the Stack is where all your Function Call returns are stored, so
if you 'dive deep', then you'd better be sure to to set the Stack
'High/Low/whatever'. And if you use a lot of Privates ( I do), then make the
Heap large".

Set Fantasy Off


In the meantime, I'll got looking thru the DGROUP stuff noted by Dave.

Thanks to both of you again.

-Mel Smith

"Stephen Quinn" <steveqNOSPAM@integritynet.com.au> wrote in message
news:36ta1qF571vftU1@individual.net...
> Mel
>
the[color=darkred]
>
> Some libraries have the stack size hardwired in them
> - SIXCDX does (IIRC 7168)
> - IIRC COMIX does as well
>
space[color=darkred]
apps --[color=darkred]
??[color=darkred]
> Probably the MM in FiveWin interfaces to (or is) the Windows MM that's

where the
> 'heap' comes into it and really has no meaning in DOS.
>
> MM = Memory Manager
>
> --
> HTH
> Steve
>
>



Andrew W. Ross

2005-02-10, 3:55 pm

Mel,

I have tweaked these settings over the years as my programs have grown, my
programming style has evolved and also due to integrated DLL requirements
(Using FiveWin too). I do know this one fact for sure; as right around a
total of 26000 (Stack + Heap), my programs become unstable. Currently, I am
using a combination of Stack = 18500 and Heap = 4100 and have had no
problems reported.

I also instruct our user's to enable the "Run in Separate Memory Space"
option in the program icon properties.

Hope this helps a little,

Andy

"Mel Smith" <medsyntel@aol.com> wrote in message
news:3704k3F57fh4tU1@individual.net...
> Dave & Stephen,
>
> Thanks for your help. My concern with Stacks & Heaps is that the
> settings appear to be arbitrary and a bit magical, and those settings are
> (apparently) related to the likelihood of GPF crashes on WinXP machines.
> If
> this is a false conclusion, then I'll probably just forget about it.
>
> I thought somebody could say to me (and I'm fantasizing):
> "Mel, the Stack is where all your Function Call returns are stored, so
> if you 'dive deep', then you'd better be sure to to set the Stack
> 'High/Low/whatever'. And if you use a lot of Privates ( I do), then make
> the
> Heap large".
>
> Set Fantasy Off
>
>
> In the meantime, I'll got looking thru the DGROUP stuff noted by Dave.
>
> Thanks to both of you again.
>
> -Mel Smith
>
> "Stephen Quinn" <steveqNOSPAM@integritynet.com.au> wrote in message
> news:36ta1qF571vftU1@individual.net...
> the
> space
> apps --
> ??
> where the
>
>



Mel Smith

2005-02-10, 3:55 pm

Andy says:

> I have tweaked these settings over the years as my programs have grown, my
> programming style has evolved and also due to integrated DLL requirements
> (Using FiveWin too). I do know this one fact for sure; as right around a
> total of 26000 (Stack + Heap), my programs become unstable. Currently, I

am
> using a combination of Stack = 18500 and Heap = 4100 and have had no
> problems reported.
>
> I also instruct our user's to enable the "Run in Separate Memory Space"
> option in the program icon properties.
>


Andy,

Thanks for these very useful observations. I'm going to modify my
settings to reflect what you are doing.

Thanks again,

-Mel Smith


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com