Oppolzer - Informatik / Blog


Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie

IBM-MAIN - Probleme bei Umstellung auf 64 bits durch 8-Byte-Pointer

Subject:

Re: Compile COBOL Programs In 64 Bit.

From:

Bernd Oppolzer <bernd.oppolzer@T-ONLINE.DE>

Reply-To:

IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU>

Date:

2015.01.20 10:32:00


Am 19.01.2015 um 23:07 schrieb T.H.:
> On 18 January 2015 at 04:29, Bernd Oppolzer <bernd.oppolzer@t-online.de> wrote:
>> What do you think about this? For the existing PL/1 code base, for example,
>> it would be a big change if all pointers would be 8 bytes long ... I don't
>> see this happen in the near future.
> In the PL/I Checkout compiler, pointers were (iirc) 128 bits, and
> carried various baggage not defined to the language, but useful in
> debugging. Of course no one used the Checker in production, but
> certainly in most cases the PL/I code should not be aware of the size
> of a pointer.

The problem is:

if you are building linked lists etc, then pointers are part of
structures etc., and if you have this, if pointer size changes, then
offsets of other fields inside structures change, too. And this was
what caused us some problems, when we migrated our (large) math
package from Windows-32 to Linux-64. Another szenario is: pointers,
that are overlaid by 32-bit integers in variants of structures
(so-called unions), because the application assumes, that both have
the same size. This doesn't work any more with 64 bit ... but maybe
you don't want to enlarge your ints to 64 bit at the same time (we
didn't do that, because THIS would have a much bigger impact on our
structure definitions, see above).

So, unfortunately, in a large code base, you have to take care about
pointer size, because there are some functions or places in this code
base, that assume a certain pointer size ... often subconsciously. You
have to find those places and eliminate the problem. Of course, it can
be done, but it is a project.

>
> T.H.

Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie