memory management - Why Windows Server 2008 R2 x64 can't allocate more than 1.2GB for 32bit process -
i have strange behavior of windows os regarding 32-bit processes regarding memory allocation. problem - seems 32-bit process can't allocate more around 1.2gb, limit floats between 1.1gb , 1.3gb depending on conditions have no idea about.
my environment is:
- windows server 2008 r2
- total physical ram - 16gb
- ram in use @ moment of experiment - 6gb (i.e. around 9+gb free)
i have self-written c++ tool, bounces memory allocation via malloc() in blocks of 32mb until gets denial os (the upper limit right 1070mb, mentioned - limit floats, max number remember around 1.3gb) , releases these blocks in reverse order. done in cycle.
so the questions have are:
why can't close real limit of 2gb 32bit process? 1.3gb 60% of theoretical limit. inability @ least 0.5 gb more seems strange me. have 9gb of unused ram.
what (at runtime) can influence on top limit? change on time - have no idea why. i'd control somehow - there magic command optimize os address space :)
in reply comments:
show loop allocate memory:
here https://code.google.com/p/membounce/source/browse/
note: after looking deeper code i've noticed bug incorrectly calculated upper limit (when allocation page size changed dynamically while tool running :() - actual limit i'm getting right around 1.6 gb - better 1.2 yet not close 2gb.build x64 instead:
in case i'm interested particularly in 32bit. original cause of topic sometime i'm not able run java (specifically netbeans x32) xmx900m (says jvm creation failed), , sometime run xmx1200m (xmx jvm parameter of max ram can used jvm). reason want use non-x64 netbeans because java (at least oracle's jvm) consumes twice more memory when switching x64, i.e have allocate 2gb of ram jvm same efficiency 1gb on 32bit jvm. have number of java processes , want fit more of them 16gb address space :) (this kind of offtopic background)
Comments
Post a Comment