user1483597
user1483597

Reputation: 570

Is it possible to allocate memory in MSVC/VC++ at given base?

Is it possible to allocate memory in MSVC at given base? Or at least force it to allocate memory below the virtual 4GB (i.e. allocate at address that uses 32 bits only) - beside compiling the solution for x86 instead of x64 of course.

Upvotes: 1

Views: 93

Answers (1)

skyking
skyking

Reputation: 14359

According to MSDN you could use /LARGEADDRESSAWARE:NO to make all memory be under the 2Gb limit.

Otherwise if you want both memory under and above the 2Gb limit you could perhaps implement an allocator above the VirtualAlloc function.

Upvotes: 2

Related Questions