This doesn’t make much sense – it seems to me you might be mixing concepts (virtual memory vs physical memory).
Of course if you pin the pages in your program (ie mlockall()), then you will reach the expected ~700MB.
what release are you using? I can’t reproduce what you see on 16.03 – I managed to allocate around 68GB.
Firstly for you reply,very impressive~ yes, I am lack of memory knowledge.
well,I use 15.03(I just replace the kernel to 4.1 but the same phenomenon in 3.18) ,if I do not disable the oom, this test will trigger the oom, so I try to disable the oom then I find I can only get the 240M memory,so I am a little curious.
I am using a test in hikey which will allocate the memory until it cannot get the memory, this test can pass in other platform(the kernel is 3.8), but always trigger the oom in hikey(and kill all the process),so I dig into this issue, but I have no idea currently, could you give me any suggestion about this problem,thanks