[interfacekit] Re: Portlink implementation
- From: "Adi Oanca" <adioanca@xxxxxxxxxxxxx>
- To: <interfacekit@xxxxxxxxxxxxx>
- Date: Tue, 22 Oct 2002 13:51:41 +0300
From: "Ingo Weinhold" <bonefish@xxxxxxxxxxxxxxx>
> > BMallocIO is GREAT for my purpose.
>
> It uses realloc() internally. So, if the allocation can be resized in
> place, no copying is necessary, otherwise it needs to be relocated.
OK I'll use BMallocIO.
> > I'm a little sorry to say this, but, such classes should've been
> > ready
> > from long time ago!
>
> Till now, noone has complained. And actually for userland there is a
> very complete library -- the STL.
Till now, I avoided STL... lots of debates over the template facility of
C++. When I needed linked lists, I've implemented them in place.
From: "burton666" <burton666@xxxxxxxxx>
> > With PortLink... all things are beautiful, every command is cached,
and
> > every command is *complete* when it reaches the app_server.
>
> And that's the problem.
> Since Portlink will also be used to implement BScreen::WaitForRetrace(),
do you think that the caching is a good thing ?
I don't get what you mean... _BSession_ is also cached, and caching is a
very good thing :).
From: "Marc Flerackers" <mflerackers@xxxxxxxxxx>
> Why would you cache the complete message, it's an instruction stream, and
> the sooner the app_server gets a piece, the sooner it can start rendering.
GOOD Point.
> > Indeed PortLink does TOO many allocations, this should be
> > fixed!!! But,
> > if we'll adopt your solution, MANY MANY changes should be made!
>
> What changes exactly?
I already said: PortLink is different in conception than _BSession_.
Entire methods have to be changed. (!!! PortLink does NOT have a
module(methods) for reading from a message(buffer) it only has methods to
write to!!!).
> If you're really against a fixed buffer (which is proven to work perfectly
> in BeOS), I would at least use realloc.
I'll use BMallocIO, as Ingo said.
OK, some conclusions:
*) It seems I'll be implementing a new PortLink class compatible with
the existing one.
*) after a good thought, I think I'll try use a fixed buffer, and ask
Marc to send me its _BSession_ class to take some code from it. IF I'll have
*great* difficulties implementing PortLink with a fixed size buffer, then...
a variable one(using BMallocIO) would be used.
OK?
Adi.
- References:
- [interfacekit] Re: Portlink implementation
- From: Ingo Weinhold
Other related posts:
- » [interfacekit] Portlink implementation
- » [interfacekit] Re: Portlink implementation
- » [interfacekit] Re: Portlink implementation
- » [interfacekit] Re: Portlink implementation
- » [interfacekit] Re: Portlink implementation
- » [interfacekit] Re: Portlink implementation
- » [interfacekit] Re: Portlink implementation
- » [interfacekit] Re: Portlink implementation
- » [interfacekit] Re: Portlink implementation
- » [interfacekit] Re: Portlink implementation
- » [interfacekit] Re: Portlink implementation
- » [interfacekit] Re: Portlink implementation
- » [interfacekit] Re: Portlink implementation
- » [interfacekit] Re: Portlink implementation
- [interfacekit] Re: Portlink implementation
- From: Ingo Weinhold