ARM Technical Support Knowledge Articles


Applies to: C166 C Compiler


Information in this article applies to:


What do the ?C_INITSEC and ?C_CLRMEMSEC functions do?


The ?C_INITSEC function initializes the global variables in your program. For example, if you program appears as follows:

unsigned long tens [] = { 1, 10, 100, 1000, 10000 };

unsigned long ten_power (unsigned char i)
return (tens[i]);

The tens array must be initialized with the values 1, 10, 100, and so on. This is what the ?C_INITSEC function does.

The ?C_CLRMEMSEC function clears uninitialized global variables to a value of 0 as defined by ANSI C.

There is no memory restriction for this section. It can reside anywhere in memory. That is also the reason why it does not belong to any memory class.

Article last edited on: 2004-04-16 15:57:00

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential