A spcptr contains a 5 byte segment and a 3 byte offset.  The teraspace
pointer is probably a 3 byte segment and a 5 byte offset with a high order
bit in the segment portion telling the machine where the segment/offset
division is. ( my  speculation ).

The 16 meg limit to a space is because that is all the 3 byte offset can
hold.

Converting from teraspace to plain old space ptr. It  would be interesting
to know if that works !

Steve Richter


----- Original Message -----
From: "Walden H. Leverich" <WaldenL@TechSoftInc.com>
To: <midrange-l@midrange.com>
Sent: Tuesday, December 18, 2001 10:55 AM
Subject: RE: Teraspace memory allocation


> 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
>
> ------------
> Walden H Leverich III
> President
> Tech Software
> (516)627-3800 x11
> WaldenL@TechSoftInc.com
> http://www.TechSoftInc.com
>
>
>
> -----Original Message-----
> From: Leif Svalgaard [mailto:leif@leif.org]
> Sent: Tuesday, December 18, 2001 10:44
> To: midrange-l@midrange.com
> 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 <WaldenL@TechSoftInc.com>
> > Nope, and it looks so damn useful.
> > I "appear" to be able to allocate memory using the _C_TS_malloc API
> > but
> then
> > 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
> "magic
> > 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: MIDRANGE-L@midrange.com To subscribe,
unsubscribe,
> or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

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.