This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: [PATCH] enlarge allowable size of diagnostic strings
- From: jeroen dobbelaere <jeroen dot dobbelaere at acunia dot com>
- To: Andrew Lunn <andrew dot lunn at ascom dot ch>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Thu, 17 Jan 2002 13:38:03 +0100
- Subject: Re: [ECOS] [PATCH] enlarge allowable size of diagnostic strings
- Organization: ACUNIA
- References: <3C46BC32.6040806@acunia.com> <20020117131115.C23781@biferten.ma.tech.ascom.ch>
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