0

Windows enables you to restrict address-space usage to a 32-bit resolution by setting a flag in the PE header (/LARGEADDRESSAWARE). To elaborate: When set, this flag effectively emulates a 32-bit virtual address space environment (image is loaded at/allocations return- addresses <= 0xFFFFFFFF)

Does Linux have an equivalent feature?

phuclv
  • 37,963
  • 15
  • 156
  • 475
Emjayen
  • 113
  • 1
  • 8

2 Answers2

0

/LARGEADDRESSAWARE allows an extended address space from 2 to 4 gigabytes for 32-bit Windows applications. Otherwise, a 32-bit application on Windows cannot reach those addresses. Linux from early on could reach them, so a /LARGEADRSSAWARE link flag is not needed.

phuclv
  • 37,963
  • 15
  • 156
  • 475
NickyP
  • 91
  • 1
  • 7
0

Allocating memory in 32-bit space on x86-64 can be done by performing mmap(2) with the MAP_32BIT flag.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358