Salesforce

Documentation states MEMPTR's and LONGCHAR's are limited by available resources

« Go Back

Information

 
TitleDocumentation states MEMPTR's and LONGCHAR's are limited by available resources
URL NameDocumentation-states-MEMPTR-s-and-LONGCHAR-s-are-limited-by-available-resources
Article Number000154343
EnvironmentProduct: OpenEdge
Version: 11.x, 12.x
OS: All supported platforms
Question/Problem Description

Documentation states MEMPTR's and LONGCHAR's are limited by available resources 

The Progress ABL Data Types Addenda manual in the documentation states with regard to "Large object data types":

"BLOB and CLOB fields can be up to 1GB in size. LONGCHAR (and MEMPTR) variables can be any size, but they are limited by system resources." 

With regard to LONGCHAR and MEMPTR data types, this statement isn't true.

Steps to Reproduce
Clarifying Information
Error MessageValue <value> too large to fit in INTEGER. Line <line> in <procedure>. (15747)
MEMPTR target of COPY-LOB is not big enough. (11394)

Couldn't allocate memory for copying a large object. (11325)
Error converting CLOB/LONGCHAR. (11327)
Defect NumberOCTA-19612
Enhancement Number
Cause
For both 32-bit and 64-bit OpenEdge clients MEMPTR data types are limited to 2GB.  Trying to use COPY-LOB with MEMPTR objects with a size greater than 2GB, or setting a MEMPTR's size to a value greater than 2GB will raise errors 15747 or 11394. 

Similarly, for both 32-bit and 64-bit OpenEdge clients LONGCHAR objects are limited to 1,073,741,823 bytes, which is one byte less than 1GB.  Trying to use COPY-LOB with a LONGCHAR that contains 1GB (1,073,741,824 bytes) or more is likely to raise the error 11327.  The fact that that the documentation suggests MEMPTR's and LONGCHAR's can be any size is a documentation bug (OCTA-19612).  

The OpenEdge client allocates memory for MEMPTR's and LONGCHAR's as a single contiguous chunk.  Therefore there must be contiguous free address space of equal or greater size in order to create the MEMPTR or LONGCHAR object.  Total free space greater than the required size alone, is not sufficient.  In 32-bit OpenEdge versions the largest possible process address space is 2GB in Microsoft Windows, but can be more in Linux. However much of the address space can be fragmented and used for other purposes.  If the object creation fails due to lack of available contiguous memory, then this is likely to raise error 11325:

Couldn't allocate memory for copying a large object. (11325)
Resolution
None at this time.
Workaround
To avoid the errors with data above the specified limits for these objects, if possible chunk the data and use COPY-LOB with with the target-filename APPEND option.
Notes
References to Other Documentation:
OpenEdge Web Paper: ABL Data Types Addenda: Chapter 3: "Large object data types"
OpenEdge Development: ABL Reference, "COPY-LOB statement"

Progress Article(s):
 How much shared memory can be allocated on 32-bit Windows?
Keyword Phrase
Last Modified Date2/15/2023 5:48 PM

Powered by