User: Password:
Subscribe / Log in / New account

Memory allocation failures and scary warnings

Memory allocation failures and scary warnings

Posted Apr 10, 2008 8:54 UTC (Thu) by sureshb (guest, #25018)
Parent article: Memory allocation failures and scary warnings

I had once implemented what we called Hostile Memory Allocator.(HMA)
I checked in the code without doing extensive testing. It caused lot
of pain and it took me more than a month to stabilize the code.
This can be disabled during production builds.

 In memory allocation code we can do something like this:

  if (some randomly generated condition) && (request is atomic)
      return NULL

Best Regards,

(Log in to post comments)

Userspace is just as bad at this.

Posted Apr 12, 2008 14:51 UTC (Sat) by dw (subscriber, #12017) [Link]

A friend is currently writing a library to stress-test user space applications against
undefined behaviour in various standards, and various failure modes that should (almost?)
always be handled correctly. Try running Firefox under this:

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds