home | list info | list archive | date index | thread index

Re: [Bulk] Re: [Bulk] Re: [OCLUG-Tech] Programming Question re: namespace ??

  • Subject: Re: [Bulk] Re: [Bulk] Re: [OCLUG-Tech] Programming Question re: namespace ??
  • From: William Case <billlinux [ at ] rogers [ dot ] com>
  • Date: Mon, 20 Aug 2007 12:36:29 -0400
Perhaps I can be clearer by explaining why I am asking.

On Mon, 2007-08-20 at 11:55 -0400, William Case wrote:
> I am sorry Bart;
> 
> In an effort to be brief, I mis-asked the question.
> 
> On Mon, 2007-08-20 at 10:42 -0400, Bart Trojanowski wrote:
> > * William Case <billlinux [ at ] rogers [ dot ] com> [070820 10:22]:
> > > Hi;
> > > 
> > > I have several paragraphs of notes regarding the 'namespace' concept.
> > > Those notes, however, leave some ambiguity. (Trying to cast the widest
> > > possible net to capture all possibilities  -- I suspect.)  I don't need
> > > a full explanation of what a namespace is other than to confirm which of
> > > the following possibilities could be called a 'namespace'.
> > >
> "ANSI C A-11 Scope and Linkage
> ...
> Therefore, there are two kinds of scope to consider; first the lexical
> scope of an identifier, which is the region of a program text within
> which  the identifiers characteristics are understood; and second, the
> scope associated with objects and functions with external linkage,
> which determines the connections between identifiers in separately
> compiled translation units  -- [OK, got that]
> 
> A-11.1
> 
> Identifiers fall into different name spaces that do not interfere with
> one another; the same identifier may be used for different purposes,
> even in the same scope, if the uses are in different name spaces.  These
> classes are: objects, functions, typedef names and enum constants;
> labels; tags of structures; unions and enumerations; and members of each
> structure or union individually."
> 
> [Here (A-11.1) the words 'name space' are used without being described
> or defined here or elsewhere.] 
> >  
I am trying to diagram how memory is used by a program.  One of the
things I would like to include in my diagram is the hierarchy of
terminology i.e.  what is a sub-set of what.  As a general idea a name
space is understandable, but when it comes to actually creating the sets
or hierarchy the description are not clear of what goes where.

As a side-bar, all the schematics I have found show just five parts to a
C program's arrangement in memory:
     1. Text Segement
     2. Initialized Data Segment
     3. Unitialized Data Segement
     4. The stack
     5. The heap

I want to be more detailed and show (draw) where each part of an actual
program would be placed at start up and while running (i.e. use of the
stack and heap).  At the same time I would like to show the relationship
between VM and actual memory.


-- 
Regards Bill