Is there a way to tell GCC not to initialize a specific global array to zero?
I want to reserve a large chunk of memory for storing a large data structure that my code manages, so I say:
#define SIZE_16_MB 0x01000000 BYTE mChunkSpace[SIZE_16_MB];
The problem is that crtinit () takes a million years to initialize this space to zero, and this is not necessary at all.
Is there a way to make it not initialize this space?
I am currently hard-coded for a memory address that is outside of what the linker knows, but this is not a particularly reliable way to do something.
Also, this is a slow built-in proc (50MHz Microblaze), so don't assume I'm talking about a PC. It really takes a long time to reset this space.
source share