9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Douglas A. Gwyn" <DAGwyn@null.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] making emalloc a library function
Date: Mon,  8 Mar 2004 10:25:57 +0000	[thread overview]
Message-ID: <c8WdnTjEyppu7dbd4p2dnA@comcast.com> (raw)
In-Reply-To: <20040307113209.GA18849@melkki.cs.Helsinki.FI>

Einar Karttunen wrote:
> I have two alternative routes. Either make libemalloc which contains
> emalloc, estrdup and so on or add a flag which makes libc malloc behave
> like emalloc. 

It is a *very* bad idea to change the behavior of malloc().
Your program might link with some library that knows how to
recover when malloc() reports failure, and if you change
malloc() to act like emalloc() you will break that library.

There should be no problem adding emalloc() to the system C
library.


      parent reply	other threads:[~2004-03-08 10:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-07 11:32 Einar Karttunen
2004-03-07 12:56 ` David Presotto
2004-03-07 15:37 ` andrey mirtchovski
2004-03-07 17:06   ` Rob Pike
2004-03-07 17:25     ` Einar Karttunen
2004-03-07 16:47       ` andrey mirtchovski
2004-03-07 23:05         ` Geoff Collyer
2004-03-07 23:10           ` boyd, rounin
2004-03-08 10:26             ` Douglas A. Gwyn
2004-03-07 18:45       ` 9nut
2004-03-07 18:48     ` 9nut
2004-03-07 19:39     ` boyd, rounin
2004-03-07 19:34   ` boyd, rounin
2004-03-08 10:25 ` Douglas A. Gwyn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c8WdnTjEyppu7dbd4p2dnA@comcast.com \
    --to=dagwyn@null.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).