[DGD] Clones and very large arrays

Robert Forshaw iouswuoibev at hotmail.com
Sat Apr 3 20:35:40 CEST 2004


>From: Bart van Leeuwen <bart at wotf.org>

>Ah yes.. that is indeed what I do. Forgot that calling a function in an
>array like that is one of my mods to the kernel (its somethign I really
>like, even if it is 'syntactic sugar' and could be replaced by a
>call_array like construct)

I'm just curious (as this may be going off topic) but what exactly happens 
in your driver when you do a call_other with an array as the first argument?
>Well, it moves the problem to the object daemon... what if that one gets
>swapped out? ;)

Since my object daemon has functions called in it whenever an object is 
inherited, cloned, or destructed it is unlikely to be swapped out! But I 
guess it is bad practice to  depend on the likelyhood of something happening 
- which brings me to ask, is there a way to prevent particular objects from 
being swapped out at all (other than calling functions in them)?

>
>I suggested arrays of arrays of clones a while back, and I have some
>experience with it. Search the archives for the 2nd half of 2003 for the
>discussion, some interesting points were made for the different solutions.

Thanks, I'll have a look.

> > Chain breakage should never happen though if you implement the linked 
>list
> > properly?
>
>Well, if you have a reliable destructor in LPC, then you can do that.

I've often thought that it would be handy for lightweight objects to have 
destructors.

>Could well be.. I never noticed a real performance hit of increasing the
>max array size from 1024 to 32767 (in the lib/kernel) but I have no
>experience with making it bigger.

Ok, thanks for the feedback. One certainty I have is that 32767 will 
eventually not be high enough to store a record of clones. So it is all down 
to determining a method of storing more. I'm prefering the idea of an array 
to a linked list, purely because it makes retrieving a list of clones 
easier. I'll go and check out the list archive for those discussions you 
mentioned.

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! 
http://www.msn.co.uk/messenger

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list