This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] enlarge allowable size of diagnostic strings


Hi

Andrew Lunn wrote:

> Wouldn't it be better to put the if outside the loop? At the moment
> its evaluated for every character. This will catch a string that is not
> terminated within 256 characters. If you put it outside the loop there
> is a small danger that a string does not have a termination before the
> end of memory. In that case you will get an exception when you fall of
> the edge of the world rather than a "Not a string" message. But you
> get a speedup in the normal case.
> 
>     Andrew
> 
[..]


I guess the 'diag_check_string' function exists to prevent a possible
'falling of the edge'...

(although I would rather like to see this edge at 2048 bytes, than at 256)

Greetings,
--
Jeroen Dobbelaere
Embedded Software Engineer

ACUNIA Embedded Solutions
http://www.acunia.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]