[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Helmut branch.... merge ??
On 10/01/15 12:05, Helmut Karlowski wrote:
> Am 10.01.2015, 09:38 Uhr, schrieb Alan Hourihane:
>
>>> - >32 handles
>>>
>>
>> I'll probably look at dynamic handles later via a linked list.
>
> I don't think that's very efficient. The file is accessed at many
> places with the handle as array-index, and the code would have to be
> changed at all those places, and you'd need to iterate.
>
Just to query, have you tried it to claim it's inefficient ?
> My idea was to use a scalable array like this:
>
> if( hnd > oldsz )
> ofilesp = realloc( oldfiles, (oldsz += 8) + 5);
>
realloc can involve copies. I'm not sure that's any more efficient than
lists. Anyway only trials will show which is best, but either way works
for me.
> and set ofiles in filedesc to ofilesp+5.
>
> But it's not much more than an idea atm.
>
>>> Also it probably won't run on a firebee, I don't know why, hints
>>> welcome.
>>
>> Getting a merge patch ready will show the differences from the trunk. So
>> it's a good process to catch things.
>
> Yes, but I'm afraid it will be hard to find the missing peace. If
> there would be reports I think I would know better where to look.
I'm not sure I follow. It's trivial once you have a patch.
Alan.