--- ed <[EMAIL PROTECTED]> wrote:
> On Fri, 22 Dec 2006 20:12:57 +0000
> "Paul Herring" <[EMAIL PROTECTED]> wrote:
> 
> > On 12/22/06, ed <[EMAIL PROTECTED]> wrote:
> > >
> > > On Fri, 22 Dec 2006 10:25:14 +0000
> > > "Paul Herring" <[EMAIL PROTECTED]> wrote:
> > >
> > > > On 12/22/06, Sunil Nair
> <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > To be more specific
> > > > >
> > > > > A pointer is a variable that holds the
> address of another
> > > > > variable................
> > > > >
> > > >
> > > > Not always:
> > > >
> > > > int* a, *b;
> > > > a = malloc(sizeof *a);
> > > > b = 0;
> > > >
> > > > Neither a nor b hold the address of another
> variable.
> > >
> > > depends what is at those locations. it might be
> unintentional but
> > > there could be something useful at both those
> locations, bit of a
> > > lucky dip.
> > 
> > 
> > Could you come up with a scenario whereby either
> the return from
> > malloc() or NULL would yield something 'useful'?
> 
> no i can't, because it's a very bad idea to try and
> make use of it. but
> like i say, it's lucky dip. when i said might be
> something useful
> there. i mean might be in use by another variable.
> 
> -- 
> Regards, Ed           

If malloc is returning the address of space that is
currently being used by some variable, get a new
compiler.  Malloc should only be returning the address
of memory that is not currently being used by any
program.

Ray

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to