Re: How to reduce Zero Initialised region.
- From: jacob navia <jacob@xxxxxxxxxxxxxxxx>
- Date: Wed, 31 Jan 2007 12:02:01 +0100
Ajai Jose a écrit :
Hi ,
I work on an ARM processor based embedded system. Code is mainly in
C language. The project has a huge source base. We are supposed to
optimise it. Most datastructures are declared as static and which
directly go into the Zero Initialised region. We need to cut the size
of this ZI region by at least 30%.
The one way i see of doing this is by removing these static arrays
and passing a pointer to the data structure whenever required. but
since these global arrays are used through out the code. A re-write
seems inevitable!
two questions I had.
1. Am I right in doing this(passing pointer instead of making the data
structure static) ?
2. Is there any alternative to this ?
Thanks in Advance,
Ajai.
Why do you think that this is the problem?
Did you measure the program's performance to see where the
hot spots are? What data leads you to your conclusion that
the static data is the problem?
If you pass pointers around it can be a better design but it will
be slightly slower, since global data needs nothing to be passed, it is
always there.
Before doing anything MEASURE FIRST!
jacob
.
- Follow-Ups:
- Re: How to reduce Zero Initialised region.
- From: Christopher Layne
- Re: How to reduce Zero Initialised region.
- References:
- How to reduce Zero Initialised region.
- From: Ajai Jose
- How to reduce Zero Initialised region.
- Prev by Date: Re: Implementation of malloc
- Next by Date: Re: How to improve this sort?
- Previous by thread: Re: How to reduce Zero Initialised region.
- Next by thread: Re: How to reduce Zero Initialised region.
- Index(es):
Relevant Pages
|