lkml.org 
[lkml]   [2000]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Overcommittable memory
> >catastrophic when it hits.  It is much easier to write applications
> >which are robust about memory allocation in a non-overcommit environment.
>
> Not really; remember, the stack is also demand-allocated.
>
Writing robust code isn't that hard - you know very well when a C
program
uses stack (function calls, local variables)

Write the program without recursion and you know at compile-time how
much memory it will ever need in the worst case.
There is always at least one page - so make sure you use less than that.
You'll need to know the stack overhead of any c-library you use - so
don't use it or figure it out. It is doable with open-source libraries.

Helge Hafting

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.032 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site