Consultor Eletrônico



Kbase P144589: 4GL/ABL: Does Progress allocate memory?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   18/11/2009
Status: Verified

GOAL:

4GL/ABL: Does Progress allocate memory?

GOAL:

What objects does Progress allocate memory for?

GOAL:

Does Progress allocate memory for CHARACTER and LONGCHAR variables?

GOAL:

Where does Progress keep the data when it is being operated upon?

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.1C

FIX:

Yes. Progress allocates memory for all sorts of objects such as: schema cache for files, fields, indexes, etc; class-objects; in-memory versions of r-code; r-code itself that is currently resident in memory; database buffers; temp-table buffers; sort buffers; frame layouts and on and on.
As for data, such as CHARACTER, LONGCHAR, etc variables and parameters of any kind, we do not pre-allocate memory for them, except for the 'coordinates' of the variable or the parameter. That is information like their size, type tag, starting address, etc. The actual data itself is all variable length, whether in memory or in a record. Even the Progress INTEGERs are variable length when in a record.
When data is being operated upon, during expression evaluation, inline data (i.e. not MEMPTR or LONGCHAR ) the data is kept in a Progress internal 'stack' which is controlled by the -s startup parameter. LONGCHARs and MEMPTRs have a separate memory scheme which allocates them according to what is needed in the case of LONGCHARs and according to SET-SIZE for MEMPTRs.