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.

-Walden

------------
Walden H Leverich III
President
Tech Software
(516)627-3800 x11
WaldenL@TechSoftInc.com
http://www.TechSoftInc.com



-----Original Message-----
From: Steve Richter [mailto:srichter@AutoCoder.com]
Sent: Tuesday, December 18, 2001 00:18
To: midrange-l@midrange.com
Subject: Re: Teraspace memory allocation


Walden,

Any progress on this ?

Steve Richter

----- Original Message -----
From: "Walden H. Leverich" <WaldenL@TechSoftInc.com>
To: <midrange-l@midrange.com>
Sent: Sunday, December 16, 2001 4:44 PM
Subject: Teraspace memory allocation


> I have a need to allocate more than 16Meg of memory. Teraspace
> allocations seem to be the ticket and it looks like I can simply call
> _C_TS_malloc,
but
> I'm looking for someone that has used it from RPGLE. Anyone? Bueller?
>
> -Walden
>
>
> ------------
> Walden H Leverich III
> President
> Tech Software
> (516)627-3800 x11
> WaldenL@TechSoftInc.com
> http://www.TechSoftInc.com
>
> _______________________________________________
> 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:

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

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