Index: share/man/man7/arch.7 =================================================================== --- share/man/man7/arch.7 +++ share/man/man7/arch.7 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 3, 2017 +.Dd May 4, 2017 .Dt ARCH 7 .Os .Sh NAME @@ -35,9 +35,52 @@ .Sh DESCRIPTION Differences between CPU architectures and platforms supported by .Fx . -.Pp +.Ss Introduction If not explicitly mentioned, sizes are in bytes. +.Pp +FreeBSD uses flat address space for program execution, where +pointers have the same binary representation as +.Vt long +variables, +.Vt uintptr_t +and +.Vt size_t +types are synonyms for +.Vt unsigned long . +.Pp +On some architectures (sparc64), kernel uses separate address space. +On other architectures, kernel address space is shared with user +address space, kernel is located at highest addresses. +.Pp +On each architecture, stack of the main thread starts near highest +user address and grows down. .Ss Type sizes +On each architecture, FreeBSD uses some variant of ELF (see +.Xr elf 5 ) +.Sy Application Binary Interface +(ABI) for the machine processor. +All supported ABIs can be divided into two groups: +.Bl -tag -width "Dv ILP32" +.It Dv ILP32 +.Vt int , +.Vt long , +.Vt void * +types machine representations all have 4-byte size. +.It Dv LP64 +.Vt int +type machine representation uses 4 bytes, +while +.Vt long +and +.Vt void * +are 8 bytes. +.El +Compilers define +.Dv _LP64 +symbol when compiling for an +.Dv LP64 +ABI. +.Pp On all supported architectures: .Bl -column -offset -indent "long long" "Size" .It Sy Type Ta Sy Size