relative addressing - C++, does absolute address of an object always remain constant until released? -


this question has answer here:

object1 * test= new object1(); 

does "test" have absolute address on ram or absolute address in virtual memory has relative starting point ram's 0 adress?

an example be, in fragmented memory started many applications each allocating , deallocating many times 10 hours, , 1 of applications ram error checking , benchmarking one. test ram addresses or runs on limited area? if reaches ram, how os able protect app other apps besides moving objects? when streaming non-pinned array pci-e , pci-e.

most oses use virtual addressing, address seen program largely independent physical address of ram itself.

some do, however, have special functions available allocate physical memory has fixed physical address. example, on windows can use allocateuserphysicalpages allocate physical pages (which can map to/unmap virtual addresses).

this still let test limited area though. it'll try allocate number of physical pages, , succeed if possible--but there (for example) parts of kernel mapped particular memory locations @ boot, , stay there until shut down (and no method provided ask them move).


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -