RPGIV @ Work

A unique site for RPG and System i Lovers

Welcome!

Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

Teraspace Print E-mail
User Rating: / 0
PoorBest 
Written by Chamara Withanachchi   

Teraspace is a large temporary space that is local to a job. A teraspace provides a contiguous address space but may consist of many individually allocated areas, with unallocated areas in between. Teraspace exists no longer than the time between job start and job end.


A teraspace is not a space object. This means that it is not a system object, and that you cannot refer to it by using a system pointer. However, teraspace is addressable with space pointers.


The following table shows how teraspace compares to single-level store.


Attributes Teraspace Single-level store
Locality Process local: normally accessible only to the owning job. Global: accessible to any job that has a pointer to it.
Size 1 TB total Many 16 MB units.
Supports memory mapping? Yes No
Addressed by 8-byte pointers? Yes No
Supports sharing between jobs? Must be done using shared memory APIs (for example, shmat or mmap). Can be done by passing pointers to other jobs or using shared memory APIs.

ILE programs use single-level store by default. In order to process teraspace addresses, a program must be teraspace enabled. Teraspace-enabled programs can process a teraspace address in a variety of contexts, for example:

  • When it is returned from a request to allocate teraspace heap storage
  • When it is returned from a request to allocate teraspace shared memory
  • When it is passed in from another program.

The following compilers generate teraspace-enabled code:

  • ILE C (choose TERASPACE(*YES) when you create modules and programs)
  • ILE C++ (choose TERASPACE(*YES) when you create modules and programs)
  • ILE RPG (teraspace-enabled is the default beginning with V4R4)
  • ILE COBOL (teraspace-enabled is the default beginning with V4R4)
  • ILE CL (teraspace-enabled is the default beginning with V5R1)

The ILE C and C++ compilers provide the TERASPACE (*YES *TSIFC) create command option to allow the use of teraspace versions of storage interfaces without source code changes. For example, malloc() is mapped to _C_TS_malloc().

<Previous   Next>