Re: Red-black trees?
- From: Patricia Shanahan <pats@xxxxxxx>
- Date: Fri, 21 Nov 2008 12:01:57 -0800
Richard Harter wrote:
On Fri, 21 Nov 2008 16:48:20 +0000, Jon Harrop
<jon@xxxxxxxxxxxxxxxxx> wrote:
Richard Harter wrote:
[snip sundry odd comments]
You are still assuming that malloc is O(1) which is only true in some
memory-constrained real-time embedded systems. So that certainly does not
apply to all GCless languages.
This comment is rather strange. Granted that there are quite a
few storage allocators out there (not all of them named malloc
btw) and some are rather inauspiciously designed. However few
are so poorly designed that their performance depends in any
significant way on the amount of storage requested. Commonly
there is a worst case time cost that is O(log #requests) or O(log amount of storage managed).
The issue that troubles me with this is the common operating system
rule that memory, including disk space, be in a fixed state, independent
of any prior contents, when initially allocated to a program or file.
There are two costs to not doing that. There could be inadvertent data
leaks from one program to an unrelated program that happens to be
assigned memory the first program released. A program could have bugs
that result from inappropriate dependence on the prior value of some
memory it allocates. The symptoms of those bugs would depend on what had
last used the memory in question, making them very different to debug.
I believe zeroing n bytes of storage is an Omega(n) operation. In order
to achieve O(log amount of storage managed) that step would have to be
skipped.
Patricia
.
- Follow-Ups:
- Re: Red-black trees?
- From: Richard Harter
- Re: Red-black trees?
- References:
- Re: Red-black trees?
- From: Mark Wooding
- Re: Red-black trees?
- From: Jon Harrop
- Re: Red-black trees?
- From: CBFalconer
- Re: Red-black trees?
- From: Jon Harrop
- Re: Red-black trees?
- From: CBFalconer
- Re: Red-black trees?
- From: Jon Harrop
- Re: Red-black trees?
- From: CBFalconer
- Re: Red-black trees?
- From: Jon Harrop
- Re: Red-black trees?
- From: Richard Harter
- Re: Red-black trees?
- From: Jon Harrop
- Re: Red-black trees?
- From: Richard Harter
- Re: Red-black trees?
- From: Jon Harrop
- Re: Red-black trees?
- From: Richard Harter
- Re: Red-black trees?
- From: Jon Harrop
- Re: Red-black trees?
- From: Richard Harter
- Re: Red-black trees?
- From: Jon Harrop
- Re: Red-black trees?
- From: Richard Harter
- Re: Red-black trees?
- From: Jon Harrop
- Re: Red-black trees?
- From: Richard Harter
- Re: Red-black trees?
- From: Jon Harrop
- Re: Red-black trees?
- From: Richard Harter
- Re: Red-black trees?
- From: Jon Harrop
- Re: Red-black trees?
- From: Richard Harter
- Re: Red-black trees?
- Prev by Date: Re: Red-black trees?
- Next by Date: Re: Red-black trees?
- Previous by thread: Re: Red-black trees?
- Next by thread: Re: Red-black trees?
- Index(es):
Relevant Pages
|