Messages in this thread | | | From | David Schwartz <> | Date | Fri, 13 Dec 2002 00:39:27 -0800 | Subject | Re: Memory Measurements and Lots of Files and Inodes |
| |
>Can anybody provide a better metric for "ram free for userspace >allocations"?
This is a constant battle for programmers trying to develop sophisticated applications for sophisticated operating systems.
If all of the applications are cooperating, you can do it fairly easily. First, ask the kernel how much physical memory there is. Then fudge a reduction based on kernel usage. Then subtract the amount of RAM each application is 'really using' by asking it.
If you write all the applications, this isn't hard to do. If you have to cooperate with other applications you didn't write, things get trickier. If you're the only application, things are really easy.
There are any number of heuristics and guesstimates. Ultimately, I recommend mostly leaving your memory usage user-configurable.
DS
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |