Le 02/12/2014 23:36, Thiago Macieira a écrit :
On Tuesday 02 December 2014 18:13:51 Dominig ar Foll wrote:
Thiago,
the kernel has indeed a defence mechanism but when it triggered the
device is already useless and furthermore the kernel will not restart
anything.
The only service available is a protection of the kernel.
That is OK when a smart human is on command, but on an embedded system,
it rarely provide anything good :-(
Understood, but please note that userspace often does not have enough
information to make the correct decision about memory usage. Processes share a
lot of pages by way of libraries they share, memory-mapped files, etc. and also
by tricks like the launcher daemon.
The only way for userspace to get the information is via /proc/*/smaps and
that is not sufficient. For this daemon to work, we should really get a kernel
feature.
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.
Dominig
_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev