Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: including sys/malloc.h produces errors?



Clark Cox wrote on 3/2/04, 1:11 pm:

> On 2004/02/03, at 15:48, Jerry Pendergraft wrote:
>
> > I am dealing with various programs that simply use malloc to allocate
> > various structures as needed for dynamic data storage.
> > So the question boils down to, if you have something like
> >
> > #include <malloc.h>
> > ....
> >
> > MYstruct *p = malloc(sizeof(MYstruct));
> > ....
> > free(p);
> > ....
> >
> > What is the best "standard/correct/portable" header to include instead
> > of
> > malloc.h ?

Note that 'man malloc' in the Terminal tells you what header
to include:

SYNOPSIS
#include <stdlib.h>

Simon
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: including sys/malloc.h produces errors? (From: Clark Cox <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.