[Date Prev][Date Next]
Re: Calysto v1.5 reports on openldap_v2.4.4alpha
Domagoj Babic wrote:
On 8/20/07, Howard Chu <firstname.lastname@example.org> wrote:
If a malloc fails in a one-shot command, that means the runtime environment is
broken, not any of our code. Whether it is very probable or totally unlikely is
irrelevant in that case.
That's one opinion. The fact that most apps I've checked so far actually guard
against "broken environment" speaks for itself.
viola:~/Desktop> limit vmemoryuse 128
viola:~/Desktop> limit vmemoryuse 1024
ls: error while loading shared libraries: libc.so.6: failed to map segment from
shared object: Cannot allocate memory
viola:~/Desktop> limit vmemoryuse 2048
1) Sometimes you will run out of memory and just die, regardless of what kind
of precautionary code you write.
2) In library code that can be invoked many times, yes, it's important to
3) In code that only executes once and then exits, it's pointless.
This is just common sense, life is short, put the effort where it matters.
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/