Solved

what is code space

Posted on 2006-12-01
3
227 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now