Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Repartee is something we think of twenty-four hours too late. -- Mark Twain


sci / sci.stat.math / Re: realloc() - frequency, conditions, or experiences about relocation?

SubjectAuthor
* Re: realloc() - frequency, conditions, or experiences about relocation?Anton Shepelev
+* Re: realloc() - frequency, conditions, or experiences about relocation?David Duffy
|+* Re: realloc() - frequency, conditions, or experiences about relocation?Malcolm McLean
||+* Re: realloc() - frequency, conditions, or experiences about relocation?Anton Shepelev
|||`- Re: realloc() - frequency, conditions, or experiences about relocation?Anton Shepelev
||`* Re: realloc() - frequency, conditions, or experiences about relocation?Ben Bacarisse
|| `* Re: realloc() - frequency, conditions, or experiences about relocation?David Brown
||  `- Re: realloc() - frequency, conditions, or experiences about relocation?Ben Bacarisse
|`- Re: realloc() - frequency, conditions, or experiences about relocation?Anton Shepelev
+- Re: realloc() - frequency, conditions, or experiences about relocation?David Jones
`* Re: realloc() - frequency, conditions, or experiences about relocation?Rich Ulrich
 +* Re: realloc() - frequency, conditions, or experiences about relocation?Keith Thompson
 |`* Re: realloc() - frequency, conditions, or experiences about relocation?Rich Ulrich
 | `* Re: realloc() - frequency, conditions, or experiences about relocation?Anton Shepelev
 |  `* Re: realloc() - frequency, conditions, or experiences about relocation?Rich Ulrich
 |   `- Re: realloc() - frequency, conditions, or experiences about relocation?Anton Shepelev
 `* Re: realloc() - frequency, conditions, or experiences about relocation?Paul
  `* Re: realloc() - frequency, conditions, or experiences about relocation?Rich Ulrich
   `* Re: realloc() - frequency, conditions, or experiences about relocation?Rich Ulrich
    `* Re: realloc() - frequency, conditions, or experiences about relocation?Paul
     +- Re: realloc() - frequency, conditions, or experiences about relocation?James Kuyper
     `- Re: realloc() - frequency, conditions, or experiences about relocation?James Kuyper

1
Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Anton Shepelev
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Mon, 17 Jun 2024 15:02 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton.txt@g{oogle}mail.com (Anton Shepelev)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about
relocation?
Date: Mon, 17 Jun 2024 18:02:49 +0300
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
References: <v4ojs8$gvji$1@dont-email.me>
<875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me>
<87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 17 Jun 2024 17:02:50 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="e4efe3e0e0736d482d811e40a75979fd";
logging-data="765209"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qs70P/WDPq5rQMWzxksVuDUCmf03wz6Y="
Cancel-Lock: sha1:YDo8xQBFeGxeLQcXyFO0Ml++fwE=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
View all headers

[cross-posted to: ci.stat.math]

Malcolm McLean:

> We have a continuously growing buffer, and we want the
> best strategy for reallocations as the stream of
> characters comes at us. So, given we now how many
> characters have arrived, can we predict how many will
> arrive,

Do you mean in the next bunch, or in total (till the end of
the buffer's lifetime)?

> and therefore ask for the best amount when we reallocate,
> so that we neither make too many reallocation (reallocate
> on every byte received) or ask for too much (demand
> SIZE_MAX memory when the first byte is received).?
>
> Your strategy for avoiding these extremes is exponential
> growth. You allocate a small amount for the first few
> bytes. Then you use exponential growth, with a factor of
> ether 2 or 1.5.

This strategy ensures a constant ratio between the amount of
reallocated data to the length of the buffer by making
reallocations less frequent as the buffer grows.

> And so we integrate the distribution between the point we
> are at and infinity. Then we tkae the mean. And that gives
> us a best estimate of how many bytes are to come, and
> therefore how much to grow the buffer by.

You have an apriori distribution of the buffer size (can be
tracked on-the-fly, if unknown beforehand) and a partially
filled buffer. The task is to calculate the a-posteriori
distribution of /that/ buffer's final size, and then to
allocate the predicted value based on a good percentile.

How about using a percentile instead of the mean, e.g. if
the current size corresponds to percentile p, you allocate a
capacity corresponding to percentile 1-(1-p)/k , where k>1
denotes the balance between space and time efficency. For
example, if the 60th percentile of the buffer is required
and k=2, you allocate a capacity sufficient to hold
100-(100-60)/2=80% of buffers.

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: David Jones
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Tue, 18 Jun 2024 17:59 UTC
References: 1 2 3 4 5 6
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dajhawk18xx@@nowhere.com (David Jones)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
Date: Tue, 18 Jun 2024 17:59:30 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 59
Message-ID: <v4shu2$1ff4q$1@dont-email.me>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk> <v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk> <v4pb4v$lhgk$1@dont-email.me> <20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 18 Jun 2024 19:59:30 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="f1972676a64567a0e5798bf903aaf93f";
logging-data="1555610"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX183Zu22dBRgeZCLTcCVptp8ugJ709ON/2w="
User-Agent: XanaNews/1.21-f3fb89f (x86; Portable ISpell)
Cancel-Lock: sha1:CX4WAHFVXGgckqNjjrB3VfpbDD4=
View all headers

Anton Shepelev wrote:

> [cross-posted to: ci.stat.math]
>
> Malcolm McLean:
>
> > We have a continuously growing buffer, and we want the
> > best strategy for reallocations as the stream of
> > characters comes at us. So, given we now how many
> > characters have arrived, can we predict how many will
> > arrive,
>
> Do you mean in the next bunch, or in total (till the end of
> the buffer's lifetime)?
>
> > and therefore ask for the best amount when we reallocate,
> > so that we neither make too many reallocation (reallocate
> > on every byte received) or ask for too much (demand
> > SIZE_MAX memory when the first byte is received).?
> >
> > Your strategy for avoiding these extremes is exponential
> > growth. You allocate a small amount for the first few
> > bytes. Then you use exponential growth, with a factor of
> > ether 2 or 1.5.
>
> This strategy ensures a constant ratio between the amount of
> reallocated data to the length of the buffer by making
> reallocations less frequent as the buffer grows.
>
> > And so we integrate the distribution between the point we
> > are at and infinity. Then we tkae the mean. And that gives
> > us a best estimate of how many bytes are to come, and
> > therefore how much to grow the buffer by.
>
> You have an apriori distribution of the buffer size (can be
> tracked on-the-fly, if unknown beforehand) and a partially
> filled buffer. The task is to calculate the a-posteriori
> distribution of that buffer's final size, and then to
> allocate the predicted value based on a good percentile.
>
> How about using a percentile instead of the mean, e.g. if
> the current size corresponds to percentile p, you allocate a
> capacity corresponding to percentile 1-(1-p)/k , where k>1
> denotes the balance between space and time efficency. For
> example, if the 60th percentile of the buffer is required
> and k=2, you allocate a capacity sufficient to hold
> 100-(100-60)/2=80% of buffers.

Based on essentially no background to this question, not much can be
said. However, if one starts from the suggestion above to use the mean
of some distribution (or later some percentile), one notes that the
"mean" is just the minimum of a quadratic cast function ,,, so an
improvement would be to base the choice on some more realistic cost
function, chosen for the actual application. Given that the scenario
apparently involves a sequence of such decisions, the obvious extension
of the cost-based approach would be to employ some form of dynamic
programming. Of course, this might not be appealing, in which case one
might choose the theoretically-simple approach of tuning a policy based
on good stchastic simulations of the situation.

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: David Duffy
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Wed, 19 Jun 2024 06:48 UTC
References: 1 2 3 4 5 6
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: davidd02@tpg.com.au (David Duffy)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
Date: Wed, 19 Jun 2024 06:48:17 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <v4tuvf$1qto5$1@dont-email.me>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk> <v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk> <v4pb4v$lhgk$1@dont-email.me> <20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
Injection-Date: Wed, 19 Jun 2024 08:48:17 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="31d8f887133f0f81d700803c97977601";
logging-data="1931013"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19y0qBGbwcBYZ9zEnccmGyzc2qWwMSSv8M="
User-Agent: tin/2.6.2-20220130 ("Convalmore") (Linux/5.15.0-112-generic (x86_64))
Cancel-Lock: sha1:Ufn1u77c+t57vdkhPzXMhxcM/L8=
View all headers

In sci.stat.math Anton Shepelev <anton.txt@g{oogle}mail.com> wrote:
> [cross-posted to: ci.stat.math]
>
> Malcolm McLean:
>
>> We have a continuously growing buffer, and we want the
>> best strategy for reallocations as the stream of
>> characters comes at us. So, given we now how many
>> characters have arrived, can we predict how many will
>> arrive,
>
> Do you mean in the next bunch, or in total (till the end of
> the buffer's lifetime)?
>
Isn't this a halting problem? Aren't the more important data:
how much memory the user is allowed to allocate, the properties of
the current system's memory allocation algorithm, when your stream
will have to go to disc or other slow large volume storage, how
the stream can be compressed on the fly (the latter might well give
strong predictions for future storage requirements based on what
has been read to date).

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Malcolm McLean
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Wed, 19 Jun 2024 09:12 UTC
References: 1 2 3 4 5 6 7
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: malcolm.arthur.mclean@gmail.com (Malcolm McLean)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about
relocation?
Date: Wed, 19 Jun 2024 10:12:22 +0100
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <v4u7dm$1t2pu$1@dont-email.me>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
<20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
<v4tuvf$1qto5$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 19 Jun 2024 11:12:23 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="1546666429f4a47bce7f01cf2bfd5cd4";
logging-data="2001726"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+NhKgLD0FcTDGgR5+7heC7SHMxQ6FYSqU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:JSfB+/4sculAWbh+xnh7XpL0sik=
Content-Language: en-GB
In-Reply-To: <v4tuvf$1qto5$1@dont-email.me>
View all headers

On 19/06/2024 07:48, David Duffy wrote:
> In sci.stat.math Anton Shepelev <anton.txt@g{oogle}mail.com> wrote:
>> [cross-posted to: ci.stat.math]
>>
>> Malcolm McLean:
>>
>>> We have a continuously growing buffer, and we want the
>>> best strategy for reallocations as the stream of
>>> characters comes at us. So, given we now how many
>>> characters have arrived, can we predict how many will
>>> arrive,
>>
>> Do you mean in the next bunch, or in total (till the end of
>> the buffer's lifetime)?
>>
> Isn't this a halting problem? Aren't the more important data:
> how much memory the user is allowed to allocate, the properties of
> the current system's memory allocation algorithm, when your stream
> will have to go to disc or other slow large volume storage, how
> the stream can be compressed on the fly (the latter might well give
> strong predictions for future storage requirements based on what
> has been read to date).
>
>
No. We have to have some knowledge. And what we probaby know is that the
input is a file stored on someone's personal computer. And someone has
published on the statistical distribution of such files And they have a
log-normal distribution with a mean and a median which he gives. So with
that informaton, we can work out, given that a file is at least N
characters, what is the prbablity that an allocation of any size will
contain the whole file, and how many bytes, on average will be wasted.

Statistical analysis can't tell us what a allocation wil cost versus the
cost of hoggng memory we don't need, however. It can;t tell us what to
do. Just put us in the picture.
--
Check out my hobby project.
http://malcolmmclean.github.io/babyxrc

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Anton Shepelev
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Wed, 19 Jun 2024 12:20 UTC
References: 1 2 3 4 5 6 7
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton.txt@g{oogle}mail.com (Anton Shepelev)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about
relocation?
Date: Wed, 19 Jun 2024 15:20:00 +0300
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <20240619152000.2738defeceb1df7203151c64@g{oogle}mail.com>
References: <v4ojs8$gvji$1@dont-email.me>
<875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me>
<87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
<20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
<v4tuvf$1qto5$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 19 Jun 2024 14:20:01 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="026ce8aa09340af2ff7fb15fc26bc16e";
logging-data="2030938"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ND7OP8LQtEeJgm0gAIn4VUlpZD7fyRyY="
Cancel-Lock: sha1:nbNA+JHvknkLzu1lhi4p3NOjeQc=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
View all headers

Malcolm McLean writes that, given the log-normal distribution
of file sizes with known parameters,

> we can work out, given that a file is at least N
> characters, what is the prbablity that an allocation of
> any size will contain the whole file, and how many bytes,
> on average will be wasted.

This is why I thought statisticians might help him: Malcolm
wants to find the aposteriori distribution of the size of a
file, after it has been found to exceed N bytes. Am I right
that if we take the remaining (N>20) part of the density
function and re-normalise it, we shall obtain the desired
distribution?

My proposition was as follows:

1. Find quantile q0 corresponding to the buffer size
currently requested.

2. Calculate new quantile q1 = 1-(1-q0)/k, where k>1 is
an adjustable parameter, and use its corresponding
value as the new allocation size.

For example, assuming for simplicity a uniform [0,20]
distribution of file sizez and k=2, a sequence of allocation
may look like this:

requested allocated
2 20-(20- 2)/2 = 11
12 20-(20-12)/2 = 16
18 20-(20-18)/2 = 19
--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Ben Bacarisse
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Wed, 19 Jun 2024 15:36 UTC
References: 1 2 3 4 5 6 7 8
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
Date: Wed, 19 Jun 2024 16:36:01 +0100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <875xu5t066.fsf@bsb.me.uk>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
<20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
<v4tuvf$1qto5$1@dont-email.me> <v4u7dm$1t2pu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Wed, 19 Jun 2024 17:36:15 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="82406a6777ea81192be6ede1e900a6d7";
logging-data="2143113"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/eocK1G7S/3nQc0spIjgJVW6wN/NXxlns="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:ZWZ+q9UZ4yXQBPKyZMjemsx50Z4=
sha1:vLEz1eZfy3s262RV5hbxlSZnREM=
X-BSB-Auth: 1.98397e6bd73b7eb51b08.20240619163601BST.875xu5t066.fsf@bsb.me.uk
View all headers

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:

> No. We have to have some knowledge. And what we probaby know is that the
> input is a file stored on someone's personal computer. And someone has
> published on the statistical distribution of such files

That's not the case that matters (to me at least). If the input is a
file, we have a much better way of "guessing" the size than guessing and
growing -- just ask for the size. Sure, we might need to make
adjustments if the file is changing, but there is always a better
measure than any statistical analysis.

To some extent this seems like a solution in search of a problem.
Growing the buffer exponentially is simple and effective.

--
Ben.

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: David Brown
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Wed, 19 Jun 2024 17:41 UTC
References: 1 2 3 4 5 6 7 8 9
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.brown@hesbynett.no (David Brown)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about
relocation?
Date: Wed, 19 Jun 2024 19:41:49 +0200
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <v4v58t$230rh$1@dont-email.me>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
<20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
<v4tuvf$1qto5$1@dont-email.me> <v4u7dm$1t2pu$1@dont-email.me>
<875xu5t066.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 19 Jun 2024 19:41:49 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="496e798c2f4d7717891a7779c6d418c6";
logging-data="2196337"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+doEZ1BuKX138+9PzKwHPN0j+0ZbYsBcc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:XziIqipJUSn9Yw42qwBC83cPZwc=
In-Reply-To: <875xu5t066.fsf@bsb.me.uk>
Content-Language: en-GB
View all headers

On 19/06/2024 17:36, Ben Bacarisse wrote:
> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>
>> No. We have to have some knowledge. And what we probaby know is that the
>> input is a file stored on someone's personal computer. And someone has
>> published on the statistical distribution of such files
>
> That's not the case that matters (to me at least). If the input is a
> file, we have a much better way of "guessing" the size than guessing and
> growing -- just ask for the size. Sure, we might need to make
> adjustments if the file is changing, but there is always a better
> measure than any statistical analysis.
>
> To some extent this seems like a solution in search of a problem.

It seems more like a solution that doesn't exist in search of a problem
with absurdly unrealistic requirements. And even if Malcolm's solution
existed, and the problem existed, it /still/ wouldn't work - knowing the
distribution of file sizes tells us nothing about the size of any given
file.

> Growing the buffer exponentially is simple and effective.
>

Yes, that's the general way to handle buffers when you don't know what
size they should be.

A better solutions for this sort of program is usually, as you say,
asking the OS for the file size (there is no standard library function
for getting the file size, but it's not hard to do for any realistic
target OS). And then for big files, prefer mmap to reading the file
into a buffer.

It's only really for unsized "files" such as piped input that you have
no way of getting the size, and then exponential growth is the way to
go. Personally, I'd start with a big size (perhaps 10 MB) that is
bigger than you are likely to need in practice, but small enough that it
is negligible on even vaguely modern computers. Then the realloc code is
unlikely to be used (but it can still be there for completeness).

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Ben Bacarisse
Newsgroups: comp.lang.c, sci.stat.math
Followup: comp.lang.c
Organization: A noiseless patient Spider
Date: Wed, 19 Jun 2024 21:24 UTC
References: 1 2 3 4 5 6 7 8 9 10
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
Followup-To: comp.lang.c
Date: Wed, 19 Jun 2024 22:24:35 +0100
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <87o77wsk18.fsf@bsb.me.uk>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
<20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
<v4tuvf$1qto5$1@dont-email.me> <v4u7dm$1t2pu$1@dont-email.me>
<875xu5t066.fsf@bsb.me.uk> <v4v58t$230rh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Wed, 19 Jun 2024 23:24:37 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="82406a6777ea81192be6ede1e900a6d7";
logging-data="2283713"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/33B1VRjgpiPoVRYp/T7JgUKClchVBC8="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:zNH5OGRHLayATjshiPlEL0N/+Io=
sha1:FcbLbN42sMnCe47MJP8k+0Adcuc=
X-BSB-Auth: 1.a85571cc43e4f6b382c3.20240619222435BST.87o77wsk18.fsf@bsb.me.uk
View all headers

David Brown <david.brown@hesbynett.no> writes:

> On 19/06/2024 17:36, Ben Bacarisse wrote:
>> Growing the buffer exponentially is simple and effective.
>
> Yes, that's the general way to handle buffers when you don't know what size
> they should be.
>
> A better solutions for this sort of program is usually, as you say, asking
> the OS for the file size (there is no standard library function for getting
> the file size, but it's not hard to do for any realistic target OS). And
> then for big files, prefer mmap to reading the file into a buffer.
>
> It's only really for unsized "files" such as piped input that you have no
> way of getting the size, and then exponential growth is the way to go.
> Personally, I'd start with a big size (perhaps 10 MB) that is bigger than
> you are likely to need in practice, but small enough that it is negligible
> on even vaguely modern computers. Then the realloc code is unlikely to be
> used (but it can still be there for completeness).

There are other uses that have nothing to do with files. I have a small
dynamic array library (just a couple of function) that I use for all
sorts of things. I can read a file or parse tokens or input a line just
by adding characters. Because of its rather general use, I don't start
with a large buffer (though the initial size can be set).

--
Ben.

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Anton Shepelev
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Wed, 19 Jun 2024 22:53 UTC
References: 1 2 3 4 5 6 7 8
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton.txt@gmail.moc (Anton Shepelev)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about
relocation?
Date: Thu, 20 Jun 2024 01:53:47 +0300
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <20240620015347.9bdcc4df03ab63d096375450@gmail.moc>
References: <v4ojs8$gvji$1@dont-email.me>
<875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me>
<87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
<20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
<v4tuvf$1qto5$1@dont-email.me>
<v4u7dm$1t2pu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 20 Jun 2024 00:53:49 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="b394b4f438bd83bf46fe16e962fd5edb";
logging-data="2318502"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/r1HnWRqgy24DdnETNx71smiLltbSz8lM="
Cancel-Lock: sha1:LE8/zn1c9L7SSeuTU5M4augVWi0=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
View all headers

Malcolm McLean:

> We have to have some knowledge. And what we probaby know
> is that the input is a file stored on someone's personal
> computer. And someone has published on the statistical
> distribution of such files And they have a log-normal
> distribution with a mean and a median which he gives. So
> with that informaton, we can work out, given that a file
> is at least N characters, what is the prbablity that an
> allocation of any size will contain the whole file, and
> how many bytes, on average will be wasted.

Observe that the standard algorithm of exponential growth is
memoryless and self-similar in that in does not depend on
context, or the history of previous reallocations. These
properties belong to (or even identify?) the exponential
distribution. We can therefore assume that exponential-
growth strategy is ideal for exponentially distributed
buffer sizes, and under that assumption determine the
relation between the CDF values (p) corresponding to
consequent re-allcoations:

p = e^x/L ,
p0 = 1-e^(L*x0) ,
p1 = 1-e^(L*x1) ,
x1 = k*x0 (by our strategy), =>
p1 = 1-(1-p0)^k .

which does not depend on the distribution and lets us
generalise this approach for any distribution:

x1 = Q( 1 - ( 1 - CDF(x0) )^k )

where:

x0 : the required size
x1 : the new recommended capacity
Q(p) : the p-Quantile of the given distribution
CDF(x): the CDF of the given distribution
k>1 : balance between speed and space efficiency

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Rich Ulrich
Newsgroups: comp.lang.c, sci.stat.math
Date: Tue, 2 Jul 2024 04:51 UTC
References: 1 2 3 4 5 6
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!border-2.nntp.ord.giganews.com!nntp.giganews.com!local-3.nntp.ord.giganews.com!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 02 Jul 2024 04:51:33 +0000
From: rich.ulrich@comcast.net (Rich Ulrich)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
Date: Tue, 02 Jul 2024 00:51:33 -0400
Message-ID: <s1178jp7fjh4rgtsafa78dp6j05ejidau2@4ax.com>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk> <v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk> <v4pb4v$lhgk$1@dont-email.me> <20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 30
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-XS33sEDuddWzNEnbSIooDZAxYztlwDuMNj89prhHlacwo30RPdeOFM/T580VvZ+bT9BDS4rLJAF9zsy!AekJQsIGTJtkAwXuKclKrFwyreRJq06gwp7z7W0wVQ9MTMtqhsxiNmq78blLdPaCkgFYISs=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
View all headers

On Mon, 17 Jun 2024 18:02:49 +0300, Anton Shepelev
<anton.txt@g{oogle}mail.com> wrote:

>[cross-posted to: ci.stat.math]
>
Anton,

The post being responded to was originally to comp.lang.c
which I don't subscribe to.

I have a question that I suppose reflects on my news source,
GigaNews, or else on my reader, Forte Agent.

Was this thread something posted 15 or 20 years ago?

I tried to call up the original post by clicking on the Message
ID when looking at headers; nothing comes up when Agent goes
online to look. The header shows multiple earlier messages;
none of them come up for me.

My clicking on Message ID works elsewhere. The logical and
simple explanation is that this is a thread old enough that
GigaNews does not have it.

I suppose that someone else might be able to tell me, if their
supplier goes back further or if GigaNews is somehow failing
to show me something that is recent.

--
Rich Ulrich

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Keith Thompson
Newsgroups: comp.lang.c, sci.stat.math
Organization: None to speak of
Date: Tue, 2 Jul 2024 05:10 UTC
References: 1 2 3 4 5 6 7
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
Date: Mon, 01 Jul 2024 22:10:00 -0700
Organization: None to speak of
Lines: 39
Message-ID: <87le2kwf9z.fsf@nosuchdomain.example.com>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
<20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
<s1178jp7fjh4rgtsafa78dp6j05ejidau2@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Tue, 02 Jul 2024 07:10:07 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="a98783fc5e0fb925d62531fe92c7b3bb";
logging-data="1596868"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185BzMWibB2kszWIDLpzIdo"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:zOkCoov9O4/gtC2zJFyS3nZYgAM=
sha1:7qwC8F9wqU4jOP/FCLK3Nk2g4+8=
View all headers

Rich Ulrich <rich.ulrich@comcast.net> writes:
> On Mon, 17 Jun 2024 18:02:49 +0300, Anton Shepelev
> <anton.txt@g{oogle}mail.com> wrote:
>
>>[cross-posted to: ci.stat.math]
>>
> Anton,
>
> The post being responded to was originally to comp.lang.c
> which I don't subscribe to.
>
> I have a question that I suppose reflects on my news source,
> GigaNews, or else on my reader, Forte Agent.
>
> Was this thread something posted 15 or 20 years ago?
>
> I tried to call up the original post by clicking on the Message
> ID when looking at headers; nothing comes up when Agent goes
> online to look. The header shows multiple earlier messages;
> none of them come up for me.
>
> My clicking on Message ID works elsewhere. The logical and
> simple explanation is that this is a thread old enough that
> GigaNews does not have it.
>
> I suppose that someone else might be able to tell me, if their
> supplier goes back further or if GigaNews is somehow failing
> to show me something that is recent.

The first article in this thread was posted to comp.lang.c by Janis
Papanagnou on 17 Jun 2024.

There were several followups on the same day. The diret parent of your
article was cross-posted to comp.lang.c and sci.stat.math by Anton
Shepelev (his was the first cross-posted article in the thread).

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Paul
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Tue, 2 Jul 2024 07:02 UTC
References: 1 2 3 4 5 6 7
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@needed.invalid (Paul)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about
relocation?
Date: Tue, 2 Jul 2024 03:02:07 -0400
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <v608lg$1hrve$1@dont-email.me>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
<20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
<s1178jp7fjh4rgtsafa78dp6j05ejidau2@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 02 Jul 2024 09:02:09 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="aca64d9d071c32fd4132aecac4cdb8f8";
logging-data="1634286"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18FmSVPrELEP+mHN2Sw7XVlFLhzpYM5RLA="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:AbVm/SopYg4k1jG5lTWwuaFigks=
In-Reply-To: <s1178jp7fjh4rgtsafa78dp6j05ejidau2@4ax.com>
Content-Language: en-US
View all headers

On 7/2/2024 12:51 AM, Rich Ulrich wrote:
> On Mon, 17 Jun 2024 18:02:49 +0300, Anton Shepelev
> <anton.txt@g{oogle}mail.com> wrote:
>
>> [cross-posted to: ci.stat.math]
>>
> Anton,
>
> The post being responded to was originally to comp.lang.c
> which I don't subscribe to.
>
> I have a question that I suppose reflects on my news source,
> GigaNews, or else on my reader, Forte Agent.
>
> Was this thread something posted 15 or 20 years ago?
>
> I tried to call up the original post by clicking on the Message
> ID when looking at headers; nothing comes up when Agent goes
> online to look. The header shows multiple earlier messages;
> none of them come up for me.
>
> My clicking on Message ID works elsewhere. The logical and
> simple explanation is that this is a thread old enough that
> GigaNews does not have it.
>
> I suppose that someone else might be able to tell me, if their
> supplier goes back further or if GigaNews is somehow failing
> to show me something that is recent.
>

MID: <v4ojs8$gvji$1@dont-email.me>

http://al.howardknight.net/

That gives this URL, as a copy of the message kicking off the thread.

http://al.howardknight.net/?STYPE=msgid&MSGI=%3Cv4ojs8%24gvji%241%40dont-email.me%3E

Some USENET News clients can work from the MID directly, but Thunderbird does not.
A bare MID does not work for everyone.

Paul

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Rich Ulrich
Newsgroups: comp.lang.c, sci.stat.math
Date: Tue, 2 Jul 2024 15:45 UTC
References: 1 2 3 4 5 6 7 8
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!border-1.nntp.ord.giganews.com!nntp.giganews.com!local-2.nntp.ord.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 02 Jul 2024 15:45:24 +0000
From: rich.ulrich@comcast.net (Rich Ulrich)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
Date: Tue, 02 Jul 2024 11:45:25 -0400
Message-ID: <qa788jp18m80t3ltd29aaokhmp0l4sop40@4ax.com>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk> <v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk> <v4pb4v$lhgk$1@dont-email.me> <20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com> <s1178jp7fjh4rgtsafa78dp6j05ejidau2@4ax.com> <87le2kwf9z.fsf@nosuchdomain.example.com>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 52
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-9ryybs8XYG4f8TCfWQ1x+cXl7jDID6NSPjErtAHl8UJEJbO2knH2ztAZ1fNqHk6JWQooTAVdMK22ztQ!y8nPZJrPEPErxB+tvq4pgkoL/9r5VAVft9iczgd5e/88lOV9rcqIPrLSuWW1AboVWQAJwck=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
View all headers

On Mon, 01 Jul 2024 22:10:00 -0700, Keith Thompson
<Keith.S.Thompson+u@gmail.com> wrote:

>Rich Ulrich <rich.ulrich@comcast.net> writes:
>> On Mon, 17 Jun 2024 18:02:49 +0300, Anton Shepelev
>> <anton.txt@g{oogle}mail.com> wrote:
>>
>>>[cross-posted to: ci.stat.math]
>>>
>> Anton,
>>
>> The post being responded to was originally to comp.lang.c
>> which I don't subscribe to.
>>
>> I have a question that I suppose reflects on my news source,
>> GigaNews, or else on my reader, Forte Agent.
>>
>> Was this thread something posted 15 or 20 years ago?
>>
>> I tried to call up the original post by clicking on the Message
>> ID when looking at headers; nothing comes up when Agent goes
>> online to look. The header shows multiple earlier messages;
>> none of them come up for me.
>>
>> My clicking on Message ID works elsewhere. The logical and
>> simple explanation is that this is a thread old enough that
>> GigaNews does not have it.
>>
>> I suppose that someone else might be able to tell me, if their
>> supplier goes back further or if GigaNews is somehow failing
>> to show me something that is recent.
>
>The first article in this thread was posted to comp.lang.c by Janis
>Papanagnou on 17 Jun 2024.
>
>There were several followups on the same day. The diret parent of your
>article was cross-posted to comp.lang.c and sci.stat.math by Anton
>Shepelev (his was the first cross-posted article in the thread).

Thanks, so it looks like a failure by GigaNews to retrieve the
recent posts.

I did see a bunch of cross-posted followups. I don't know C,
and I thought there could be more context.

Looking at original, absent posts is something I've done dozens
of times over the years. Never a problem, except fora time or two
with posts from the 1990s. I've used GigaNews since my regular
ISP stopped providing Usenet access, maybe 15 years ago.

--
Rich Ulrich

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Rich Ulrich
Newsgroups: comp.lang.c, sci.stat.math
Date: Tue, 2 Jul 2024 15:52 UTC
References: 1 2 3 4 5 6 7 8
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!border-2.nntp.ord.giganews.com!border-3.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 02 Jul 2024 15:52:56 +0000
From: rich.ulrich@comcast.net (Rich Ulrich)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
Date: Tue, 02 Jul 2024 11:52:56 -0400
Message-ID: <l5888j1gma8soa327bi31tge8d7kmr9jsj@4ax.com>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk> <v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk> <v4pb4v$lhgk$1@dont-email.me> <20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com> <s1178jp7fjh4rgtsafa78dp6j05ejidau2@4ax.com> <v608lg$1hrve$1@dont-email.me>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 57
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-zfi0bUpQnAZ1hqH+zH+Tf/clKzb1P0zNiYRiC2YQ621SSe2Y9NNa1l/JS0KrbJnP4I5qyiT2K63QgGh!xaLK58Pnr068Zr6wqTqQA5vLryCMVjcgO1vWWPx9ytemi0zwV8slvVn+oVCL19q4ZSYIsV4=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
View all headers

On Tue, 2 Jul 2024 03:02:07 -0400, Paul <nospam@needed.invalid> wrote:

>On 7/2/2024 12:51 AM, Rich Ulrich wrote:
>> On Mon, 17 Jun 2024 18:02:49 +0300, Anton Shepelev
>> <anton.txt@g{oogle}mail.com> wrote:
>>
>>> [cross-posted to: ci.stat.math]
>>>
>> Anton,
>>
>> The post being responded to was originally to comp.lang.c
>> which I don't subscribe to.
>>
>> I have a question that I suppose reflects on my news source,
>> GigaNews, or else on my reader, Forte Agent.
>>
>> Was this thread something posted 15 or 20 years ago?
>>
>> I tried to call up the original post by clicking on the Message
>> ID when looking at headers; nothing comes up when Agent goes
>> online to look. The header shows multiple earlier messages;
>> none of them come up for me.
>>
>> My clicking on Message ID works elsewhere. The logical and
>> simple explanation is that this is a thread old enough that
>> GigaNews does not have it.
>>
>> I suppose that someone else might be able to tell me, if their
>> supplier goes back further or if GigaNews is somehow failing
>> to show me something that is recent.
>>
>
>MID: <v4ojs8$gvji$1@dont-email.me>
>
>http://al.howardknight.net/
>
>That gives this URL, as a copy of the message kicking off the thread.
>
> http://al.howardknight.net/?STYPE=msgid&MSGI=%3Cv4ojs8%24gvji%241%40dont-email.me%3E
>

Yes, that's the message I see when I plug the Message ID
into the program at http://al.howardknight.net/

Thanks. I'm saving that.

>Some USENET News clients can work from the MID directly, but Thunderbird does not.
>A bare MID does not work for everyone.

Forte Agent invites me to click on the MID; asks if it is a
mail or MID; asks if it should search the net. It still works
when I test it on an old message in another group.

--
Rich Ulrich

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Rich Ulrich
Newsgroups: comp.lang.c, sci.stat.math
Date: Tue, 2 Jul 2024 15:58 UTC
References: 1 2 3 4 5 6 7 8 9
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!border-2.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 02 Jul 2024 15:58:10 +0000
From: rich.ulrich@comcast.net (Rich Ulrich)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
Date: Tue, 02 Jul 2024 11:58:11 -0400
Message-ID: <hm888jphepmpqpqk4n55rov8n5fhjjshhj@4ax.com>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk> <v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk> <v4pb4v$lhgk$1@dont-email.me> <20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com> <s1178jp7fjh4rgtsafa78dp6j05ejidau2@4ax.com> <v608lg$1hrve$1@dont-email.me> <l5888j1gma8soa327bi31tge8d7kmr9jsj@4ax.com>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 16
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-K4jh8h/jkhAif2u+lm1NIdatbInDhQKD8oXyex8yy/T4vc17CTmLaBi+ZyyWuZuHOb/Hmmv2JgxuN2V!NAn+/3DTgU2N8rPCPqFW2Wp1li1+V7oQGnYv40fgFDQ9tKsUYjfKzcOA2NuEQRJ/emAPJgw=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
View all headers

On Tue, 02 Jul 2024 11:52:56 -0400, Rich Ulrich
<rich.ulrich@comcast.net> wrote:

>
>Forte Agent invites me to click on the MID; asks if it is a
>mail or MID; asks if it should search the net. It still works
>when I test it on an old message in another group.
>

Now it occurs to me -- It actually does make sense,
economically, if what is searched online is limited the
groups I subscribe to, or (even) only the group that
is currently active.

--
Rich Ulrich

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Paul
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Tue, 2 Jul 2024 19:09 UTC
References: 1 2 3 4 5 6 7 8 9 10
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@needed.invalid (Paul)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about
relocation?
Date: Tue, 2 Jul 2024 15:09:25 -0400
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <v61j97$1oo17$1@dont-email.me>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
<20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
<s1178jp7fjh4rgtsafa78dp6j05ejidau2@4ax.com> <v608lg$1hrve$1@dont-email.me>
<l5888j1gma8soa327bi31tge8d7kmr9jsj@4ax.com>
<hm888jphepmpqpqk4n55rov8n5fhjjshhj@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 02 Jul 2024 21:09:28 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="aca64d9d071c32fd4132aecac4cdb8f8";
logging-data="1859623"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19VMSIuZnya+r1L+V4tFS6CiS/rgFbQYKA="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:EPBkvUMI3ezuhLemejMknDkDRfc=
In-Reply-To: <hm888jphepmpqpqk4n55rov8n5fhjjshhj@4ax.com>
Content-Language: en-US
View all headers

On 7/2/2024 11:58 AM, Rich Ulrich wrote:
> On Tue, 02 Jul 2024 11:52:56 -0400, Rich Ulrich
> <rich.ulrich@comcast.net> wrote:
>
>>
>> Forte Agent invites me to click on the MID; asks if it is a
>> mail or MID; asks if it should search the net. It still works
>> when I test it on an old message in another group.
>>
>
> Now it occurs to me -- It actually does make sense,
> economically, if what is searched online is limited the
> groups I subscribe to, or (even) only the group that
> is currently active.
>

Every device has "retention", but retention is limited.

Whether it's a search site, or a USENET server (even Forte had
their own news server, at one time), you need retention for
older articles to be search-able either as body text, or as
a <mid>.

Now that Google Groups is no longer connected to USENET,
that's one fewer places with a decent-sized archive. Google closed
their service, after the ThaiSpam incident. The Eternal-September
server, changed from one server to a two-server setup. The
Transit Server had Spam Assassin loaded on it, removing THaiSpam,
and the second server continued to offer normal ("filtered") service.

The comp.lang.c group was one of the groups under attack. Since
Google was letting the spam in, now that Google is disconnected,
the spam is gone, and the readership on CLC has gone up.

Paul

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: James Kuyper
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Tue, 2 Jul 2024 20:54 UTC
References: 1 2 3 4 5 6 7 8 9 10 11
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuyper@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about
relocation?
Date: Tue, 2 Jul 2024 16:54:46 -0400
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <v61pem$1pm4j$1@dont-email.me>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
<20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
<s1178jp7fjh4rgtsafa78dp6j05ejidau2@4ax.com> <v608lg$1hrve$1@dont-email.me>
<l5888j1gma8soa327bi31tge8d7kmr9jsj@4ax.com>
<hm888jphepmpqpqk4n55rov8n5fhjjshhj@4ax.com> <v61j97$1oo17$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 02 Jul 2024 22:54:46 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d5c95c1317fa975b93ba1eaa31d1cfd6";
logging-data="1890451"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MWGFFSLNXq0yCE0bSUCssbVBpE5dQDA4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:GOMuo//WraTv7JpAmh+k3nptmSQ=
Content-Language: en-US
In-Reply-To: <v61j97$1oo17$1@dont-email.me>
View all headers

On 7/2/24 15:09, Paul wrote:
....
> Now that Google Groups is no longer connected to USENET,

I just checked, and as I had expected, Google is still connected.

> that's one fewer places with a decent-sized archive. Google closed
> their service, after the ThaiSpam incident.

They didn't close their service. They just stopped adding new messages
to their archives. The messages that were stored prior to the closing
are still available for searching.

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: James Kuyper
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Tue, 2 Jul 2024 20:58 UTC
References: 1 2 3 4 5 6 7 8 9 10 11
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuyper@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about
relocation?
Date: Tue, 2 Jul 2024 16:58:14 -0400
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <v61pl6$1pm4j$2@dont-email.me>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
<20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
<s1178jp7fjh4rgtsafa78dp6j05ejidau2@4ax.com> <v608lg$1hrve$1@dont-email.me>
<l5888j1gma8soa327bi31tge8d7kmr9jsj@4ax.com>
<hm888jphepmpqpqk4n55rov8n5fhjjshhj@4ax.com> <v61j97$1oo17$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 02 Jul 2024 22:58:18 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d5c95c1317fa975b93ba1eaa31d1cfd6";
logging-data="1890451"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jBt3W9Lu/3ldqqRXo1aBTJQg0W4mnPM8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:VcbZsclK2h9YPVYpQpH3CpjHHNA=
In-Reply-To: <v61j97$1oo17$1@dont-email.me>
Content-Language: en-US
View all headers

On 7/2/24 15:09, Paul wrote:
....
> Now that Google Groups is no longer connected to USENET,
....
> that's one fewer places with a decent-sized archive. Google closed
> their service, after the ThaiSpam incident.

While they no longer store new messages, they still have one of the
largest archives of old messages, and it's still available for searching.

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Anton Shepelev
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Mon, 8 Jul 2024 16:34 UTC
References: 1 2 3 4 5 6 7 8 9
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton.txt@g{oogle}mail.com (Anton Shepelev)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about
relocation?
Date: Mon, 8 Jul 2024 19:34:56 +0300
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <20240708193456.a1ebe2d0872239c525120d84@g{oogle}mail.com>
References: <v4ojs8$gvji$1@dont-email.me>
<875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me>
<87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
<20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
<v4tuvf$1qto5$1@dont-email.me>
<v4u7dm$1t2pu$1@dont-email.me>
<20240620015347.9bdcc4df03ab63d096375450@gmail.moc>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 08 Jul 2024 18:34:57 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="46dbe6ab9786220f9431ea65e0802f88";
logging-data="1007462"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dW5OrM9YwP9VEUxwAYzRfAOolvMyNtVk="
Cancel-Lock: sha1:9pHXKQsEvabZtBG4GdPejG6e5Sg=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
View all headers

I had plumb forgot about this solution of mine:

> p0 = 1-e^(L*x0) ,
> p1 = 1-e^(L*x1) ,
> x1 = k*x0 (by our strategy), =>
> p1 = 1-(1-p0)^k .
>
> which does not depend on the distribution and lets us
> generalise this approach for any distribution:
>
> x1 = Q( 1 - ( 1 - CDF(x0) )^k )
> where:
>
> x0 : the required size
> x1 : the new recommended capacity
> Q(p) : the p-Quantile of the given distribution
> CDF(x): the CDF of the given distribution
> k>1 : balance between speed and space efficiency

Let us test it with the exponential distribution, for which:

Q (p) = -Ln( 1 - p )/L
CDF(x) = 1 - e^(-Lx)

Substituting these into the equation for x1:

x1 = Q ( 1 - ( 1 - ( 1 - e^(-Lx0) ) )^k ) =
Q ( 1 - ( e^(-Lx0) )^k ) =
Q ( 1 - e^(-kLx0) ) =
-Ln( e^(-kLx0) )/L = k*x0 (QED)

That is, my solution is a/the generalisation of the
exponential growth strategy.

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Anton Shepelev
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Mon, 8 Jul 2024 17:01 UTC
References: 1 2 3 4 5 6 7 8 9
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton.txt@g{oogle}mail.com (Anton Shepelev)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about
relocation?
Date: Mon, 8 Jul 2024 20:01:21 +0300
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <20240708200121.ec07d0338a336b56cc7387a1@g{oogle}mail.com>
References: <v4ojs8$gvji$1@dont-email.me>
<875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me>
<87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
<20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
<s1178jp7fjh4rgtsafa78dp6j05ejidau2@4ax.com>
<87le2kwf9z.fsf@nosuchdomain.example.com>
<qa788jp18m80t3ltd29aaokhmp0l4sop40@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 08 Jul 2024 19:01:23 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="46dbe6ab9786220f9431ea65e0802f88";
logging-data="1007462"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18FwxAQMrpwlRqIwz5fQ80rA1c4bQy3OIQ="
Cancel-Lock: sha1:LJR3g9+jFTuuioYdV0vD2kR8Yw4=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
View all headers

Rich Ulrich:

> Thanks, so it looks like a failure by GigaNews to retrieve
> the recent posts.
>
> I did see a bunch of cross-posted followups. I don't know
> C, and I thought there could be more context.

Characters are being read in (say, from a file) sequentially
and stored in computer memory (RAM) in an "array" -- a
linear data structure storing elements (our characters) in a
sequential order, one ofter the other at addresses with
increasing indexes -- somewhat like a mathematical vector.

In order to store a character in an array, sufficient memory
has to be "allocated" for it, but while reading we do not
know beforehand the size of the file (or the total length of
the sequence), and therefore increase the allocated aray
size prospectively once the previous allocation is filled.
This operaion is called `realloc' and frequently involves
the tedious copying of the entire array onto a new location
in memory, taking a time in proportion to the number
elemennts so far allocated.

The question is to develop an optimal allcation strategy for
a given distribution of file sizes. The fasted solution is
to allocate a gigantic array beforehand, but it is a
terrible waste of memory. The slowet solution is to
reallcoate for each single character read it, but is a
terrible waste of CPU time. As I understand the problem, a
strategy is needed that manifests some compromise between
the extremes.

> Looking at original, absent posts is something I've done
> dozens of times over the years. Never a problem, except
> fora time or two with posts from the 1990s. I've used
> GigaNews since my regular ISP stopped providing Usenet
> access, maybe 15 years ago.

Just in case, there are many totally free Usenet servers,
e.g.:
http://www.eternal-september.org/
https://www.i2pn2.org/

and even a web interface:

https://www.novabbs.com

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Rich Ulrich
Newsgroups: comp.lang.c, sci.stat.math
Date: Sun, 21 Jul 2024 23:40 UTC
References: 1 2 3 4 5 6 7 8 9 10
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!border-1.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 21 Jul 2024 23:40:15 +0000
From: rich.ulrich@comcast.net (Rich Ulrich)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
Date: Sun, 21 Jul 2024 19:40:16 -0400
Message-ID: <ug6r9j5caqlcasn784p8h63b8s1mhf5j26@4ax.com>
References: <v4ojs8$gvji$1@dont-email.me> <875xu8vsen.fsf@bsb.me.uk> <v4ovqf$j5hq$1@dont-email.me> <87zfrjvqp6.fsf@bsb.me.uk> <v4pb4v$lhgk$1@dont-email.me> <20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com> <s1178jp7fjh4rgtsafa78dp6j05ejidau2@4ax.com> <87le2kwf9z.fsf@nosuchdomain.example.com> <qa788jp18m80t3ltd29aaokhmp0l4sop40@4ax.com> <20240708200121.ec07d0338a336b56cc7387a1@g{oogle}mail.com>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 32
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-FLLYDTcbB2ossaHzx/DSNppo+mjFHEO617hlv1FAEmTtNF3mGrjAn9byK5EvaE3n42bQxuXf+AA55CE!9hw2h3T/GwqU1nP2TRJD3R+p8D6D2jyoj9TiHzCUCnMM0xWjGd30E67aQIK5LgzpPKnyTLM=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
View all headers

On Mon, 8 Jul 2024 20:01:21 +0300, Anton Shepelev
<anton.txt@g{oogle}mail.com> wrote:

>Rich Ulrich:
>
>> Thanks, so it looks like a failure by GigaNews to retrieve
>> the recent posts.
>>
>> I did see a bunch of cross-posted followups. I don't know
>> C, and I thought there could be more context.

<snip. Thanks for the details.>

Okay, today I discovered that there was no failure by Giganews
or by Forte Agent -- Instead, there was BEHAVIOR by Agent
that I was not aware of.

Today, was looking at All Desks (Agent terminology) to see what
was in Sent, and I noticed there were messages in Inbox -- Those
were the messages that I thought Agent had failed to retrieve.
(Nice discussion there.)

I guess - every other time I've clicked on Message-ID, the old
message was in the group where I was reading and the old one
showed up where I was reading. I've read the Agent group for
ages, and I don't remember this feature ever being mentioned.

Live and learn.

--
Rich Ulrich

Subject: Re: realloc() - frequency, conditions, or experiences about relocation?
From: Anton Shepelev
Newsgroups: comp.lang.c, sci.stat.math
Organization: A noiseless patient Spider
Date: Tue, 23 Jul 2024 13:47 UTC
References: 1 2 3 4 5 6 7 8 9 10 11
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton.txt@g{oogle}mail.com (Anton Shepelev)
Newsgroups: comp.lang.c,sci.stat.math
Subject: Re: realloc() - frequency, conditions, or experiences about
relocation?
Date: Tue, 23 Jul 2024 16:47:39 +0300
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <20240723164739.d60ba6e9e8b850adf3887846@g{oogle}mail.com>
References: <v4ojs8$gvji$1@dont-email.me>
<875xu8vsen.fsf@bsb.me.uk>
<v4ovqf$j5hq$1@dont-email.me>
<87zfrjvqp6.fsf@bsb.me.uk>
<v4pb4v$lhgk$1@dont-email.me>
<20240617180249.96dfaafa89392827aa162434@g{oogle}mail.com>
<s1178jp7fjh4rgtsafa78dp6j05ejidau2@4ax.com>
<87le2kwf9z.fsf@nosuchdomain.example.com>
<qa788jp18m80t3ltd29aaokhmp0l4sop40@4ax.com>
<20240708200121.ec07d0338a336b56cc7387a1@g{oogle}mail.com>
<ug6r9j5caqlcasn784p8h63b8s1mhf5j26@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 23 Jul 2024 15:47:40 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="7fb650ba776c0c58c8083f478e356d96";
logging-data="1298663"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nS02pfU0lW0JOgz8RDPzUtc+wjLrvYN8="
Cancel-Lock: sha1:wbHoIUtxA88cK40I2Ahv/JKl7tg=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
View all headers

Rich Ulrich:

> Today, was looking at All Desks (Agent terminology) to see
> what was in Sent, and I noticed there were messages in
> Inbox -- Those were the messages that I thought Agent had
> failed to retrieve. (Nice discussion there.)

Looking forward to your take on the problem. Mine is rather
simplisitc, but can be easily tested with several
distributions. This is like extrapolation: we know the
optimal solution for the given distribution (exponential)
and want to devise a general method to get the optimal
solution for any given distribution.

Malcolm, if you are still interested, can you provide a test
program that measures some statiscits for various allocation
strategies on various distributions, inclusing the
exponential?

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

1

rocksolid light 0.9.8
clearnet tor