### Navigation

- index
- next |
- previous |
- Memory Pool System 1.111.0 documentation »
- Internals »

# 2. Platforms

## 2.1. Platform codes

The MPS uses a six-character platform code to express a combination of operating system, CPU architecture, and compiler toolchain. Each six-character code breaks down into three pairs of characters: `OSARCT`. The first pair of characters names the operating system:

`OS` | Operating system | Constant
--- | --- | ---
`fr` | FreeBSD | `MPS_OS_FR`
`li` | Linux | `MPS_OS_LI`
`w3` | Windows | `MPS_OS_W3`
`xc` | OS X | `MPS_OS_XC`

The second pair of characters names the processor architecture:

`AR` | Processor architecture | Constant
--- | --- | ---
`i3` | Intel/AMD IA-32 | `MPS_ARCH_I3`
`i6` | Intel/AMD x86-64 | `MPS_ARCH_I6`

The third pair of characters names the compiler toolchain:

`CT` | Compiler toolchain | Constant
--- | --- | ---
`gc` | GNU Compiler collection | `MPS_BUILD_GC`
`ll` | Clang/LLVM | `MPS_BUILD_LL`
`mv` | Microsoft Visual C/C++ | `MPS_BUILD_MV`

In each case the aspect of the platform can be tested by checking whether the preprocessor constant in the third column in the table is defined, and the full platform can be tested by checking whether the corresponding `MPS_PF_` preprocessor constant is defined. For example, “`xci6ll`” platform corresponds to the `MPS_PF_XCI6LL` preprocessor constant.

Not all combinations of operating system, processor architecture, and compiler are supported.

## 2.2. Platform interface

    #include "mpstd.h"

`MPS_ARCH_I3`

  A C preprocessor macro that indicates, if defined, that the target processor architecture of the compilation is a member of the IA-32 Intel/AMD family of 32-bit processors.

`MPS_ARCH_I6`

  A C preprocessor macro that indicates, if defined, that the target processor architecture of the compilation is a member of the x86-64 Intel/AMD family of 64-bit processors.

  Note

  The MPS is not supported on IA-64 (Itanium).

`MPS_BUILD_GC`

  A C preprocessor macro that indicates, if defined, that the MPS was compiled by the C compiler from the GNU Compiler Collection (GCC).

`MPS_BUILD_LL`

  A C preprocessor macro that indicates, if defined, that the MPS was compiled by Clang, the C compiler from the LLVM (Low Level Virtual Machine) system.

`MPS_BUILD_MV`

  A C preprocessor macro that indicates, if defined, that the MPS was compiled by the C compiler from Microsoft Visual Studio.

`MPS_OS_FR`

  A C preprocessor macro that indicates, if defined, that the MPS was compiled on a FreeBSD operating system.

`MPS_OS_LI`

  A C preprocessor macro that indicates, if defined, that the MPS was compiled on a Linux operating system.

`MPS_OS_W3`

  A C preprocessor macro that indicates, if defined, that the MPS was compiled on a Windows operating system.

`MPS_OS_XC`

  A C preprocessor macro that indicates, if defined, that the MPS was compiled on an OS X operating system.

`MPS_PF_ALIGN`

  A C preprocessor macro that expands to an integer giving the natural alignment of the platform.

`MPS_PF_FRI3GC`

  A C preprocessor macro that indicates, if defined, that the platform consists of the FreeBSD operating system, the IA-32 processor architecture, and the GCC compiler.

`MPS_PF_FRI6GC`

  A C preprocessor macro that indicates, if defined, that the platform consists of the FreeBSD operating system, the x86-64 processor architecture, and the GCC compiler.

`MPS_PF_LII3GC`

  A C preprocessor macro that indicates, if defined, that the platform consists of the Linux operating system, the IA-32 processor architecture, and the GCC compiler.

`MPS_PF_LII6GC`

  A C preprocessor macro that indicates, if defined, that the platform consists of the Linux operating system, the x86-64 processor architecture, and the GCC compiler.

`MPS_PF_STRING`

  A C preprocessor macro that names the platform for which the MPS was built.

`MPS_PF_W3I3MV`

  A C preprocessor macro that indicates, if defined, that the platform consists of the Windows operating system, the IA-32 processor architecture, and the Microsoft Visual C/C++ compiler.

`MPS_PF_W3I6MV`

  A C preprocessor macro that indicates, if defined, that the platform consists of the Windows operating system, the x86-64 processor architecture, and the Microsoft Visual C/C++ compiler.

`MPS_PF_XCI3GC`

  A C preprocessor macro that indicates, if defined, that the platform consists of the OS X operating system, the IA-32 processor architecture, and the GCC compiler.

`MPS_PF_XCI3LL`

  A C preprocessor macro that indicates, if defined, that the platform consists of the OS X operating system, the IA-32 processor architecture, and the Clang/LLVM compiler.

`MPS_PF_XCI6LL`

  A C preprocessor macro that indicates, if defined, that the platform consists of the OS X operating system, the x86-64 processor architecture, and the Clang/LLVM compiler.

`MPS_T_ULONGEST`

  A C preprocessor macro that expands to the name of the largest unsigned integral type.

  The exact identity of this type is platform-dependent. Typical identities are `unsigned long` and `unsigned __int_64`.

`MPS_T_WORD`

  A C preprocessor macro that expands to the name of an unsigned integral type that is the same size as an object pointer, so that `sizeof(MPS_T_WORD) == sizeof(void*)`.

  The exact identity of this type is platform-dependent. Typical identities are `unsigned long` and `unsigned __int_64`.

`MPS_WORD_SHIFT`

  A C preprocessor macro that expands to the logarithm to base 2 of the constant `MPS_WORD_WIDTH`, so that `1 << MPS_WORD_SHIFT == MPS_WORD_WIDTH`.

  The value is platform-dependent. Typical values are 5 and 6.

`MPS_WORD_WIDTH`

  A C preprocessor macro that expands to the width in bits of the type `MPS_T_WORD`, so that `MPS_WORD_WIDTH == sizeof(MPS_T_WORD) * CHAR_BIT`.

  This value is platform-dependent. It is always a power of 2: typical values are 32 and 64.

## 2.3. Historical platform codes

The platform codes in the tables below were in use in older versions of the Memory Pool System, but are not currently supported.

Formerly supported operating systems:

`OS` | Operating system | Constant
--- | --- | ---
`i5` | Irix 5 or 6 (old ABI) | `MPS_OS_I5`
`ia` | Irix 6 (new ABI) | `MPS_OS_IA`
`o1` | OSF/1 aka Tru64 | `MPS_OS_O1`
`s7` | Macintosh System 7, 8, or 9 | `MPS_OS_S7`
`so` | Solaris | `MPS_OS_SO`
`su` | SunOS | `MPS_OS_SU`

Formerly supported processor architectures:

`AR` | Processor architecture | Constant
--- | --- | ---
`i4` | Intel/AMD IA-32 [1] | `MPS_ARCH_I4`
`al` | Digital Alpha | `MPS_ARCH_AL`
`m2` | MIPS R2000 | `MPS_ARCH_M2`
`m4` | MIPS R4000 | `MPS_ARCH_M4`
`m6` | Motorola 68000 | `MPS_ARCH_M6`
`pp` | PowerPC | `MPS_ARCH_PP`
`s8` | SPARC V8 | `MPS_ARCH_S8`
`s9` | SPARC V9 (32-bit) | `MPS_ARCH_S9`

Formerly supported compiler toolchains:

`CT` | Compiler toolchain | Constant
--- | --- | ---
`ac` | Macintosh Programmer’s Workshop C/C++ | `MPS_BUILD_AC`
`cc` | The “native” C compiler [2] | `MPS_BUILD_CC`
`cx` | SunPro C CXREF tool | `MPS_BUILD_CX`
`eg` | Experimental GNU Compiler System (EGCS) | `MPS_BUILD_EG`
`gp` | GCC with profiling | `MPS_BUILD_GP`
`lc` | LCC | `MPS_BUILD_LC`
`mw` | Metrowerks CodeWarrior | `MPS_BUILD_MW`
`sc` | SunPro C | `MPS_BUILD_SC`

Notes

[1] | Obsolete: the MPS used to make a distinction between the 80386 and 80486 processor architectures.

[2] | This was the MIPSpro C compiler on IRIX; and the Digital C Compiler on OSF/1.

## 2.4. Historical platform list

This is the full list of platforms that have ever been supported by the Memory Pool System, with their current status.

Platform | Status
--- | ---
`fri3gc` | Supported
`fri4gc` | Corrected to `fri3gc`
`fri6gc` | Supported
`i5m2cc` | Not supported
`iam4cc` | Not supported
`lii3eg` | Not supported
`lii3gc` | Supported
`lii4gc` | Corrected to `lii3gc`
`lii6gc` | Supported
`lippgc` | Not supported
`o1alcc` | Not supported
`o1algc` | Not supported
`s7m6mw` | Not supported
`s7ppac` | Not supported
`s7ppmw` | Not supported
`sos8cx` | Not supported
`sos8gc` | Not supported
`sos8gp` | Not supported
`sos9sc` | Not supported
`sus8gc` | Not supported
`w3almv` | Not supported
`w3i3m9` | Not supported
`w3i3mv` | Supported
`w3i6mv` | Supported
`w3ppmv` | Not supported
`xci3gc` | Not supported
`xci3ll` | Supported
`xci6ll` | Supported
`xcppgc` | Not supported

### Navigation

- index
- next |
- previous |
- Memory Pool System 1.111.0 documentation »
- Internals »