[interfacekit] Re: BMallocIO broken
- From: Jack Burton <burton666@xxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Sun, 06 Oct 2002 22:26:20 +0200
On 2002-10-06 at 20:24:29 [+0200], you wrote:
> Looking at the code for BMallocIO, it looks like it's resizing on a
> Write() even if the new calculated size (ie position + bytes written)
> is *less* blocks than are currently allocated.
Hm... it should not...
=09size_t newSize =3D max(pos + size, static_cast<off_t>(fLength));
=09status_t error =3D B_OK;
=09if (newSize > fMallocSize)
=09=09error =3D SetSize(newSize);
See? It resizes JUST if the newSize is more than the current allocated
memory.
Anyway, the behaviour of my MallocIO implementation is very strange when
used with the storage kit tests. I am looking into it.
- Follow-Ups:
- [interfacekit] Re: BMallocIO broken
- From: Erik Jaesler
- References:
- [interfacekit] Re: BMallocIO broken
- From: Graham Gilmore
Other related posts:
- » [interfacekit] BMallocIO broken
- » [interfacekit] Re: BMallocIO broken
- » [interfacekit] Re: BMallocIO broken
- » [interfacekit] Re: BMallocIO broken
- » [interfacekit] Re: BMallocIO broken
- » [interfacekit] Re: BMallocIO broken
- » [interfacekit] Re: BMallocIO broken
- » [interfacekit] Re: BMallocIO broken
- » [interfacekit] Re: BMallocIO broken
- » [interfacekit] Re: BMallocIO broken
- » [interfacekit] Re: BMallocIO broken
- [interfacekit] Re: BMallocIO broken
- From: Erik Jaesler
- [interfacekit] Re: BMallocIO broken
- From: Graham Gilmore