Re: How to reduce Zero Initialised region.
- From: "Ajai Jose" <ajai.jose@xxxxxxxxx>
- Date: 31 Jan 2007 04:08:56 -0800
On Jan 31, 4:48 pm, "Samuel Stearley" <nya...@xxxxxxxxx> wrote:
1. Am I right in doing this (passing pointer instead of making the data structure static) ?
That will make the executable larger. How much increase can be
tolerated?
I mean passing an extra parameter to a function might increase code
size(text segment). Some additional code for sending the parameter
during function prolog. that is all the penalty right ?
but it will free some space of the ZI region when it comes to big
arrays.
2. Is there any alternative to this ?
In my experience people use UINT32s everywhere because they don't want
to look old fashioned. I suggest studying the values assigned to
datums in these structures. Maybe a UINT16 would work equally well.
But don't go around sticking UINT8s in the middle of a data structure.
-Samuel S
I understand what you are pointing at but I am particularly looking at
some huge global arrays which eat into the ZI region in a big way.
Small structures I have seen that the original developer has done a
good job.
Thx,
Ajai.
.
- Follow-Ups:
- Re: How to reduce Zero Initialised region.
- From: Thad Smith
- Re: How to reduce Zero Initialised region.
- From: Samuel Stearley
- Re: How to reduce Zero Initialised region.
- References:
- How to reduce Zero Initialised region.
- From: Ajai Jose
- Re: How to reduce Zero Initialised region.
- From: Samuel Stearley
- How to reduce Zero Initialised region.
- Prev by Date: Re: How to reduce Zero Initialised region.
- Next by Date: Re: How to reduce Zero Initialised region.
- Previous by thread: Re: How to reduce Zero Initialised region.
- Next by thread: Re: How to reduce Zero Initialised region.
- Index(es):