Send it along if you would. I'm not sure if 8-byte teraspace pointers have a
correlation to 8 byte addresses in the single-level model which is where OPM
must live. My guess is that the 8-byte address is an offset into the 16-byte
space but I'll take a look.


Walden H Leverich III
Tech Software
(516)627-3800 x11

-----Original Message-----
From: Leif Svalgaard []
Sent: Tuesday, December 18, 2001 10:44
Subject: Re: Teraspace memory allocation

If you can obtain an 8-byte address (I think this is what you call an 8-byte
pointer) it is very easy to convert that into a 16-byte RPG-style (or
MI-style) pointer. I'll send you a program (OPM) to do that it you'll like
to try.

From: Walden H. Leverich <>
> Nope, and it looks so damn useful.
> I "appear" to be able to allocate memory using the _C_TS_malloc API
> but
> I'm screwed. If I declare the "pointers" as pointers in RPG then stuff
> doesn't work because pointers in rpg are 16 bytes, but the teraspace
> stuff wants 8 bytes. If I declare the pointers are 8 byte alpha fields
> I think I get a valid allocation, but I can't tell because I can't use
> the memory because I don't have a pointer to it. I found a PASE API
> that looks to convert a teraspace pointer to a space pointer, but the
> api is very clear that this can only be used in PASE programs.
> C/C++ Programmers have it easy because you can change the storage
> model to teraspace and all pointers will become 8-byte teraspace
> pointers. RPG is teraspace "Enabled" but there is no way to change the
> storage model to teraspace.
> Teraspace looked incredibly cool for two reasons. 1) Memory
> allocations > 16Meg and 2) Pointers can be byte-aligned. I need >16Meg
> but the byte alignment seemed so cool too. In my application I wanted
> to call a routine that allocated the memory and returned the pointer
> to the caller as a
> cookie." The caller should never use the contents of the magic cookie
> it should just pass it into other functions in my service program that
> understood how to use it. I can do this with pointers but then I have
> to tell the user of my routines to make sure that the quad-word
> alignment of the pointer is preserved at all times, where
> byte-alignment has no such problems.

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: To subscribe, unsubscribe,
or change list options,
or email:
Before posting, please take a moment to review the archives

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by 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.