[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-users] [patch #5360] HTML: Increase webinterface buffer to avo
From: |
z |
Subject: |
[Mldonkey-users] [patch #5360] HTML: Increase webinterface buffer to avoid problems with long output |
Date: |
Tue, 5 Sep 2006 21:49:06 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) |
Follow-up Comment #26, patch #5360 (project mldonkey):
Unfortunately I don't see how you can be "pretty sure the results are real",
nor how it can be a workaround.
stdlib/buffer.ml
let resize b more =
let len = b.length in
let new_len = ref len in
while b.position + more > !new_len do new_len := 2 * !new_len done;
if !new_len > Sys.max_string_length then begin
if b.position + more <= Sys.max_string_length
then new_len := Sys.max_string_length
else failwith "Buffer.add: cannot grow buffer"
end;
let new_buffer = String.create !new_len in
String.blit b.buffer 0 new_buffer 0 b.position;
b.buffer <- new_buffer;
b.length <- !new_len
As you can see, a buffer will fail to grow ONLY if it exceeds
Sys.max_string_length. That is the *only* way it can fail.
If you initialize the buffer to 1, 150, 150305 or 3949392, it will double in
size each resize until it exceeds Sys.max_string_length. That is not what I
feel, nor what I guess is happening, nor the impression I get after using
mldonkey for a week or two. It is what the cold hard code says that it is
doing! :-)
The larger point that I am trying to make is that some code might be going
into CVS that doesn't make any logical sense.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?5360>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [Mldonkey-users] [patch #5360] HTML: Increase webinterface buffer to avoid problems with long output, spiralvoice, 2006/09/01
- [Mldonkey-users] [patch #5360] HTML: Increase webinterface buffer to avoid problems with long output, spiralvoice, 2006/09/01
- [Mldonkey-users] [patch #5360] HTML: Increase webinterface buffer to avoid problems with long output, spiralvoice, 2006/09/01
- [Mldonkey-users] [patch #5360] HTML: Increase webinterface buffer to avoid problems with long output, Fabiano, 2006/09/03
- [Mldonkey-users] [patch #5360] HTML: Increase webinterface buffer to avoid problems with long output, z, 2006/09/05
- [Mldonkey-users] [patch #5360] HTML: Increase webinterface buffer to avoid problems with long output, Fabiano, 2006/09/05
- [Mldonkey-users] [patch #5360] HTML: Increase webinterface buffer to avoid problems with long output,
z <=
- [Mldonkey-users] [patch #5360] HTML: Increase webinterface buffer to avoid problems with long output, spiralvoice, 2006/09/07
- [Mldonkey-users] [patch #5360] HTML: Output bigger than 16MB can not be displayed due to buffer size limits, spiralvoice, 2006/09/12
- [Mldonkey-users] [patch #5360] HTML: Output bigger than 16MB can not be displayed due to buffer size limits, Fabiano, 2006/09/13
- [Mldonkey-users] [patch #5360] HTML: Output bigger than 16MB can not be displayed due to buffer size limits, spiralvoice, 2006/09/13