Solved

what is code space

Posted on 2006-12-01
3
258 Views
Last Modified: 2010-04-01
I am supposed to explain/define “code space” as part of a homework problem in C++ but I couldn’t find much with Google.  Can someone explain it in lame terms?
0
Comment
Question by:melged
3 Comments
 

Author Comment

by:melged
ID: 18057900
Duh!  Forgot to type my inquiry before I hit submit.

I am supposed to explain/define “code space” as part of a homework problem in C++ but I couldn’t find much with Google.  Can someone explain it in lame terms?

Thanks.
0
 
LVL 3

Expert Comment

by:Akumas
ID: 18058549
code space?
never heard of it@@
maybe you means code scope or name space?
0
 
LVL 11

Accepted Solution

by:
cup earned 50 total points
ID: 18059374
Wiki is your friend http://en.wikipedia.org/wiki/Code_space

You will probably need to explain by example.  These are stored in code space: it is basically any code that cannot be changed while the program is running

const char* myname = "wo de ming zi";
int HowMany (int* x)
{
   int count;

   for (count = 0; x[count] != 0; ++count)
      ;
   return count;
}

These will be in data space

int x[50];
bool robert;

Codespace is increased when the routines appear in headers - every source file that includes the header has a copy of the routine.  This is a very common problem with coders who love inline code.  In the old days when space was limited, codespace was reused with overlays.  Nowadays, space isn't a problem and automatic paging takes care of it.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question