[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [DotGNU]NEWBIE TODO: Fix MemoryStream class
From: |
Thong \(Tum\) Nguyen |
Subject: |
RE: [DotGNU]NEWBIE TODO: Fix MemoryStream class |
Date: |
Mon, 12 May 2003 09:25:46 +1200 |
Patch has been sent :-).
I've also changed the default behaviour of MemoryStreams to align with
MS and Mono.
A MemoryStream that hasn't been written to has a default capacity of 0
(instead of 16). This capacity is set to 1024 on first write and doubles
thereafter (meaning you should get only ~ O(log2(n/1024)) array
reallocations...or something like that ;)).
The output from the test case now matches the output of both Mono and
MS.
^Tum
> -----Original Message-----
> From: Gopal V [mailto:address@hidden
> Sent: Monday, 12 May 2003 4:20 a.m.
> To: DotGNU Mailing List
> Subject: [DotGNU]NEWBIE TODO: Fix MemoryStream class
>
> Hi,
> This is perhaps the easiest TODO around , IIRC ... So here goes
!.
> MemoryStream does not grow as you write data to it ... which is a
> serious problem right now ... (not too serious ;-)
>
> So who's up for fixing it ?
>
> (testcase : should give 204800 as the o/p of the attached program, in
*nix)
>
> Gopal
> --
> The difference between insanity and genius is measured by success