• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 175
  • Last Modified:

static functions

I would like to know what is the differnce, in memory allocation and performance considerration, if I define, in the global section, a fuinction as a static or not static.
I am not going to use this function from other source file.

I am using VC++/6 and NT4/SVR

1 Solution
Defining a function as static only hides the function inside
the module (it can be called (linked to) from another module).

It has NO other affects, including mem or performance.

C overloads the use of static inside functions to declare
the data as global rather than the stack. but this is specific
to data.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Become a Leader in Data Analytics

Gain the power to turn raw data into better business decisions and outcomes in your industry. Transform your career future by earning your MS in Data Analytics. WGU’s MSDA program curriculum features IT certifications from Oracle and SAS.  

Tackle projects and never again get stuck behind a technical roadblock.
Join Now