[Robelle] [SmugBook] [Index] [Prev] [Next]

Long and Short Pointers in PA-RISC

On MPE a long pointer is 64-bits, consisting of a 32-bit object number (Space Id) and a 32-bit byte offset, making 4 gigabytes the maximum size of a single object, including a file (2 gigabytes before MPE/iX 4.0 because they actually used signed integer arithmetic). A long pointer can address any byte in the system, including the file system. When a file is opened with the long-mapped option, a long pointer is returned that points to the first byte in the file.

A short pointer is 32-bits, but the first two bits are used to define which Space Register is used to define the object intended. Thus a short pointer can address four quadrants of 1 gigabyte each. When a named file is opened with the short-mapped option it uses Space Register 6 (SR6) to reserve part of one quadrant for your file. Since you share this address space with everyone else on the system, only small files can be opened short-mapped. Unnamed short-mapped files are given space in Space Register 5 (SR5). So, while they are still limited to 4 megabytes, you can have as many as you want (until you run out of SR5 space).

[Robelle] [SmugBook] [Index] [RISC] [Prev] [Next]