From -5287010778708465124
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ba46df2c00e31ceb,start
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2004-02-26 22:05:13 PST
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!cyclone.bc.net!news.alt.net!comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Delivered-To: std-c++@ucar.edu
From: Scott Meyers <Usenet@aristeia.com>
Newsgroups: comp.std.c++
Subject: Why no size_t in global operator delete?
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <MPG.1aa86999b63db146989733@news.hevanet.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
X-Newsreader: MicroPlanet Gravity v2.60
X-Complaints-To: abuse@supernews.com
X-Spam-Checker-Version: SpamAssassin 2.60-mulga_r1 (1.212-2003-09-23-exp) on 
	mulga.cs.mu.OZ.AU
X-Spam-Status: No, hits=0.0 required=5.2 tests=none autolearn=no 
	version=2.60-mulga_r1
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Date: Fri, 27 Feb 2004 00:02:54 CST
Lines: 22
Xref: archiver1.google.com comp.std.c++:1238

Classes can declare an operator delete that has the runtime system provide
the size of the just-destructed-object whose memory is being deallocated:

  void operator delete(void *ptr, size_t sizeOfFormerObject);

Does anybody know why there is no global operator delete with this same
signature?  A client of mine claims to have a good reason for wanting to
know the size of the memory being deallocated by the global operator
delete, and when he asked me why there was no global version like the class
version taking a size_t, I found that I had no idea why such a version is
missing.  Is there a good technical basis for the omission?

Thanks,

Scott

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



