Re: How to reduce Zero Initialised region.
- From: Chris Dollin <chris.dollin@xxxxxx>
- Date: Wed, 31 Jan 2007 15:15:39 +0000
Thad Smith wrote:
Ajai Jose wrote:
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.
Why do you want to reduce the size of only zero-initialized RAM?
Because that's what they're running out of. It's an embedded system:
some of them have Funny Specifications. I /suspect/, given that it's
an ARM, that there's some zero-initialised memory that's directly
addressable from a dedicated register and hence is only 4K wide.
(If you don't have a dedicated register you need to load the
address into a spare register before addressing, which means either
loading a pointer you /can/ directly address, which, since we've
eliminated "directly addressed from a dedicated register", means
"directly addressed via the PC", which means you may have multiple
copies of the constant lying around, bad news for embedded; or you
have to assemble the constant in-line, taking at least one and
maybe more instructions, ditto.) But that's just an off-topic guess.
--
Chris "electric hedgehog" Dollin
"The path to the web becomes deeper and wider" - October Project
.
- References:
- How to reduce Zero Initialised region.
- From: Ajai Jose
- Re: How to reduce Zero Initialised region.
- From: Samuel Stearley
- Re: How to reduce Zero Initialised region.
- From: Ajai Jose
- Re: How to reduce Zero Initialised region.
- From: Thad Smith
- How to reduce Zero Initialised region.
- Prev by Date: Re: Does Casting Slow a Program Down?
- Next by Date: Re: Does Casting Slow a Program Down?
- Previous by thread: Re: How to reduce Zero Initialised region.
- Next by thread: Re: How to reduce Zero Initialised region.
- Index(es):