|
Hi Darren,of
I'll take a shot at this... I believe this falls back to how SLS
(single level storage) manages objects. There will only be one copy
the program object in main storage at one time. Potentially many JOBSprogram
can invoke that program object. All memory allocations for that
occur at run time, so that storage for this program is local to eachJOB
that is running the program.much
The actual size of the program object doesn't impact the system as
as the amount of storage to be initialized. Moving static globals toto
local may not improve performance, since local variables must be
allocated and initialized each time the procedure is invoked. In the
global/static realm, the allocation only occurs once...
-Eric DeLong
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of darren@xxxxxxxxx
Sent: Monday, November 16, 2009 8:53 AM
To: midrange-RPG RPG message board
Subject: Affect of program size on memory usage
I've taken some pride in reducing static storage by moving variables
local subprocedures, which also makes the code more readable too.as
However,
I often see the size of the program itself grow by much more than the
storage reduction. I use DBGVIEW(*LIST), so I'm fairly certain that
Ilist
add more source lines, my program object grows quickly in size. SQL
also
takes a toll as it adds access path information when the program is
first
executed.
My question is, does the system i load the whole program object into
memory, or is their some intelligence there? If so, is there a way to
compare the real program object size, minus the source view?
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.