[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] Tagged mbi
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: [RFC] Tagged mbi |
Date: |
Thu, 07 Jan 2010 22:32:47 +0100 |
User-agent: |
Mozilla-Thunderbird 2.0.0.22 (X11/20091109) |
Robert Millan wrote:
> On Mon, Jan 04, 2010 at 10:12:51PM +0100, Vladimir 'φ-coder/phcoder'
> Serbinenko wrote:
>
>> Hello. Currently mbi contains a lot of pointers and substructures. It's
>> has various problems like:
>> -Unused fields occupy space if any subsequent fields is used.
>> -Difficult to relocate since it may be spilled all over the memory
>> -It's unstraightforward to e.g. specify 2 framebuffers
>>
>
> Seems like there's a problem indeed.
>
>
>> I propose to use tagged MBI.
>>
>
> Can you provide a short explanation on this proposed solution? You explained
> the problem, but not the solution.
>
>
The solution is to have so called tags. Tag is a structure which begins
with fields "size" and "type" and the rest of the content is determined
by these 2 fields. Tags follow each other and the end of structure is a
predefined tag. This way it's easy to skip unknown tags because of size
field, easy to relocate because mbi is in a contiguous chunk of memory.
Same type of tag may appear multiple times declaring e.g. 2
framebuffers. Details are in spec patch
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
signature.asc
Description: OpenPGP digital signature