On Wednesday 03 December 2014 10:36:26 Dominig ar Foll wrote:
> the model that I have used in previous project was to check have the
> ressource manager to try to allocate the memory amount considered to be
> the healthy minimum for a very short time an to release it.
> That model also allow to check that not only memory is available but a
> decent amount of continuous memory can be allocated.

Contiguous memory does not make sense in userspace. One contiguous block of 
virtual memory can be backed by a series of discontiguous pages. And there are 
very, very few legitimate uses of contiguous physical blocks of memory and 
they're all related to hardware.

I don't recommend trying to allocate memory to check if you can allocate 
memory, as you may cause the very problem you're trying to prevent (suppose 
something else tries to allocate a healthy amount of memory at the same time). 
Besides, you have to fault in all of those pages to make sure you actually got 
them, which will imply CPU usage...
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev

Reply via email to