Home > Archive > Clipper > April 2006 > Low Memory
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]
|
|
| Fred Zuckerman 2006-04-14, 6:55 pm |
| I have a large program (S'87) & Blinker 5.0. It is composed with approx 40
..prg programs.
It's a menu driven system that drills down through various prgs. As you exit
each .prg you are returned to the calling .prg. Every .prg ends with CLOSE
DATABASES & RELEASE ALL.
However, using the MEMORY(0) cmd If I start with a result of 116 (which
signifies 116 kb ram, I think). Then drill down through a few .prgs and then
return to the beginning .prg, sometimes MEMORY(0) yields a result of only
90.
If I'm releasing all of my variables when done and I do not create any new
PUBLIC variables, where does the memory go? I have noticed that the .prg
files that do not return the memory use a lot of arrays, is there something
special about arrays?
Thanks,
Fred Zuckerman
| |
|
| Its Been a long time since ive worked with s87
the best thing too do is get clipper 52e or 53
and blinker 7.0 ....
or just work on all ur overlays more....
make as many publics into privates
Dave
"Fred Zuckerman" <ZuckermanF@sbcglobal.net> wrote in message
news:58Q%f.59206$F_3.17538@newssvr29.news.prodigy.net...
> I have a large program (S'87) & Blinker 5.0. It is composed with approx 40
> .prg programs.
>
> It's a menu driven system that drills down through various prgs. As you
exit
> each .prg you are returned to the calling .prg. Every .prg ends with CLOSE
> DATABASES & RELEASE ALL.
>
> However, using the MEMORY(0) cmd If I start with a result of 116 (which
> signifies 116 kb ram, I think). Then drill down through a few .prgs and
then
> return to the beginning .prg, sometimes MEMORY(0) yields a result of only
> 90.
>
> If I'm releasing all of my variables when done and I do not create any new
> PUBLIC variables, where does the memory go? I have noticed that the .prg
> files that do not return the memory use a lot of arrays, is there
something
> special about arrays?
>
> Thanks,
> Fred Zuckerman
>
>
| |
| pete@nospam.demon.co.uk 2006-04-14, 6:55 pm |
| In article <58Q%f.59206$F_3.17538@newssvr29.news.prodigy.net>
ZuckermanF@sbcglobal.net "Fred Zuckerman" writes:
Hi Fred,
> I have a large program (S'87) & Blinker 5.0. It is composed with approx 40
> .prg programs.
>
> It's a menu driven system that drills down through various prgs. As you exit
> each .prg you are returned to the calling .prg. Every .prg ends with CLOSE
> DATABASES & RELEASE ALL.
Can't remember for certain, but seem to recall that RELEASE
doesn't do a lot in Clipper -- it's tolerated as dBase III
baggage but ignored. But I could be wrong!!
> However, using the MEMORY(0) cmd If I start with a result of 116 (which
> signifies 116 kb ram, I think). Then drill down through a few .prgs and then
> return to the beginning .prg, sometimes MEMORY(0) yields a result of only
> 90.
>
> If I'm releasing all of my variables when done and I do not create any new
> PUBLIC variables, where does the memory go? I have noticed that the .prg
> files that do not return the memory use a lot of arrays, is there something
> special about arrays?
Not that I'm aware of. I just ran a quick test here for 3 nested
prgs that declare arrays, and got back what I started with.
[prg1]
clear screen
? "this is prg1, mem0 returns", memory(0)
wait ("press a key")
do prg2
? "back in prg1, mem0 returns", memory(0)
return
[prg2]
? "this is prg2, mem0 returns", memory(0)
wait ("press a key")
declare arr2 [500]
? "just declared array [500] -- mem0 returns", memory(0)
wait ("press a key")
do prg3
? "back in prg2, mem0 returns", memory(0)
wait ("press a key")
return
[prg3]
? "this is prg3, mem0 returns", memory(0)
wait ("press a key")
declare arr3 [500]
? "just declared array [500] -- mem0 returns", memory(0)
wait ("press a key")
return
clipper prg1 -m
clipper prg2 -m
clipper prg3 -m
plink86 fi prg1,prg2,prg3 mixc verb lib c:\clipper\clipper
Are you sure that you are not creating any PUBLIC vars? That's
to say, creating your arrays with PUBLIC ARRAY rather than
DECLARE? You can see from my test above that I didn't
specifically RELEASE anything, and it all worked.
> Thanks,
> Fred Zuckerman
Not sure I've been much help...
Pete
--
"We have not inherited the earth from our ancestors,
we have borrowed it from our descendants."
| |
|
| another thing you have too much code in the root of the exe
over lay more and make ur main start up routine the only thing in the root
of the exe
Dave
"Fred Zuckerman" <ZuckermanF@sbcglobal.net> wrote in message
news:58Q%f.59206$F_3.17538@newssvr29.news.prodigy.net...
> I have a large program (S'87) & Blinker 5.0. It is composed with approx 40
> .prg programs.
>
> It's a menu driven system that drills down through various prgs. As you
exit
> each .prg you are returned to the calling .prg. Every .prg ends with CLOSE
> DATABASES & RELEASE ALL.
>
> However, using the MEMORY(0) cmd If I start with a result of 116 (which
> signifies 116 kb ram, I think). Then drill down through a few .prgs and
then
> return to the beginning .prg, sometimes MEMORY(0) yields a result of only
> 90.
>
> If I'm releasing all of my variables when done and I do not create any new
> PUBLIC variables, where does the memory go? I have noticed that the .prg
> files that do not return the memory use a lot of arrays, is there
something
> special about arrays?
>
> Thanks,
> Fred Zuckerman
>
>
| |
| Nick Ramsay 2006-04-15, 7:55 am |
| On Fri, 14 Apr 2006 16:32:01 GMT, "Fred Zuckerman"
<ZuckermanF@sbcglobal.net> wrote:
>I have a large program (S'87) & Blinker 5.0. It is composed with approx 40
>.prg programs.
>
>It's a menu driven system that drills down through various prgs. As you exit
>each .prg you are returned to the calling .prg. Every .prg ends with CLOSE
>DATABASES & RELEASE ALL.
>
>However, using the MEMORY(0) cmd If I start with a result of 116 (which
>signifies 116 kb ram, I think). Then drill down through a few .prgs and then
>return to the beginning .prg, sometimes MEMORY(0) yields a result of only
>90.
>
>If I'm releasing all of my variables when done and I do not create any new
>PUBLIC variables, where does the memory go? I have noticed that the .prg
>files that do not return the memory use a lot of arrays, is there something
>special about arrays?
>
A couple of things you need to remember here:
1) The VMM system is quite primitive & will fragment memory at the
slightest provocation. Relying on the results of memory(0) is
probably not a good idea.
2) The garbage collector can be invoked at will by doing a memory(-1)
call. This may change the subsequent result of memory(0) (and it may
not).
In summary, my advice would be to forget about the VMM system unless
you have specific problems with your app actually running out of VMM
or similar.
| |
|
| Fred,
I have not had memory problems with arrays.
When I first started using blinker, I made a shell of a program that
looked like:
Do "original program"
return
Blinker (1.5) happily handled all the swapping for me. I did keep an
eye on the environment variables like R0 if it did not call any DOS
programs. Pkzip took about r50, lha was my favorite but could take up
to r190.
My original time and billing program is still this way and runs every
day under XP. I have arrays to display open projects and up to 500
array items. No memory problems there but your array could be much
larger. (4096 max).
Doubt I will ever move it from S'87. It works sooo well.
Maybe one of the overlay "chunks" is bigger than the others and
Memory(0) is reflecting which one is currently in memory.
Mike
|
|
|
|
|