# US 2018/0024765 A1 · Short pointer mode applications in long pointer mode environments

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2018/0024765 A1
- Document ID: US20180024765A1
- Status: Published application
- Kind: A1
- Application number: 15/216,850
- Filed: 2016-07-22
- Published: 2018-01-25
- Earliest claimed: 2016-07-22
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Michael K. Gschwind
- Web page: https://patentgrep.com/patent/US20180024765A1

## CPC

- G06F 12/0223: {User address space allocation, e.g. contiguous or non contiguous base addressing}
- G06F 8/43: {Checking; Contextual analysis}
- G06F 8/443: {Optimisation}
- G06F 9/44521: {Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading}
- G06F 12/0615: {Address space extension}
- G06F 12/023: {Free address space management}
- G06F 12/0292: {using tables or multilevel address translation means (G06F12/023 takes precedence; address translation in virtual memory systems G06F12/10)}
- G06F 2212/1004: Compatibility, e.g. with legacy hardware
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Short pointer mode applications are able to execute in long pointer mode environments. A plurality of actions is performed to prepare a short pointer mode application for execution in the long pointer mode environment. These actions include allocating memory for one or more in-memory short pointers of the application. The memory being allocated for an in-memory short pointer is of a size corresponding to a size of the in-memory short pointer. Further, a register is allocated for an in-register short pointer of the application. The register is allocated at a size corresponding to a long pointer mode. The size corresponding to the long pointer mode is different from the size of the in-memory short pointer.

## Claims

### Claim 1

A computer program product for facilitating processing in a computing environment, said computer program product comprising:
a computer readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising:
performing a plurality of actions to prepare an application defined as a short pointer mode application for execution in a long pointer mode environment, the plurality of actions including:
allocating memory for one or more in-memory short pointers of the application, the memory being allocated for an in-memory short pointer being of a size corresponding to a size of the in-memory short pointer; and
allocating a register for an in-register short pointer of the application, the register being allocated at a size corresponding to a long pointer mode, the size corresponding to the long pointer mode being different from the size of the in-memory short pointer.

### Claim 2 (depends on 1)

The computer program product of claim 1, wherein the size of the in-memory short pointer and the size of the in-register short pointer are one of 31 bits or 32 bits, and the size corresponding to the long pointer mode is 64 bits.

### Claim 3 (depends on 1)

The computer program product of claim 1, wherein the application uses short pointers and calls one or more libraries using pointers of a size corresponding to the long pointer mode.

### Claim 4 (depends on 1)

The computer program product of claim 1, wherein the in-register short pointer is zero extended in the register.

### Claim 5 (depends on 1)

The computer program product of claim 1, wherein the performing the plurality of actions further comprises passing, by the application, the in-register short pointer as a parameter, the passing the in-register short pointer as a parameter including passing the in-register short pointer in the register allocated for the long pointer mode.

### Claim 6 (depends on 1)

The computer program product of claim 1, wherein the performing the plurality of actions further comprises converting a pointer load instruction of the application to a load short instruction and a pointer store instruction of the application to a store short instruction to facilitate executing the application defined as a short pointer mode application in the long pointer mode environment.

### Claim 7 (depends on 1)

The computer program product of claim 1, wherein the performing the plurality of actions further comprises translating one or more pointer computations of the application to include overflow handling.

### Claim 8 (depends on 1)

The computer program product of claim 1, wherein the performing the plurality of actions further comprises receiving a long pointer from a called function and using the long pointer as a short pointer.

### Claim 9 (depends on 1)

The computer program product of claim 1, wherein the method further comprises:
receiving a shared pointer in a short pointer compilation, the shared pointer to be shared with a long pointer mode application and the short pointer mode application; and
performing one or more sharing actions, based on receiving the shared pointer.

### Claim 10 (depends on 9)

The computer program product of claim 9, wherein the performing one or more sharing actions comprises:
allocating the shared pointer as a long pointer; and
performing at least one of:
writing the shared pointer as a zero-extended long pointer; or
reading the shared pointer as a long pointer.

### Claim 11

A computer system for facilitating processing, said computer system comprising:
a memory; and
a processor in communication with the memory, wherein the computer system is configured to perform a method, said method comprising:
performing a plurality of actions to prepare an application defined as a short pointer mode application for execution in a long pointer mode environment, the plurality of actions including:
allocating memory for one or more in-memory short pointers of the application, the memory being allocated for an in-memory short pointer being of a size corresponding to a size of the in-memory short pointer; and
allocating a register for an in-register short pointer of the application, the register being allocated at a size corresponding to a long pointer mode, the size corresponding to the long pointer mode being different from the size of the in-memory short pointer.

### Claim 12 (depends on 11)

The computer system of claim 11, wherein the performing the plurality of actions further comprises passing, by the application, the in-register short pointer as a parameter, the passing the in-register short pointer as a parameter including passing the in-register short pointer in the register allocated for the long pointer mode.

### Claim 13 (depends on 11)

The computer system of claim 11, wherein the performing the plurality of actions further comprises converting a pointer load instruction of the application to a load short instruction and a pointer store instruction of the application to a store short instruction to facilitate executing the application defined as a short pointer mode application in the long pointer mode environment.

### Claim 14 (depends on 11)

The computer system of claim 11, wherein the performing the plurality of actions further comprises translating one or more pointer computations of the application to include overflow handling.

### Claim 15 (depends on 11)

The computer system of claim 11, wherein the method further comprises:
receiving a shared pointer in a short pointer compilation, the shared pointer to be shared with a long pointer mode application and the short pointer mode application; and
performing one or more sharing actions, based on receiving the shared pointer.

### Claim at position 16

-20. (canceled)
