Re: malloc without stdlib.h



On Jun 8, 11:58 pm, Joe Wright <joewwri...@xxxxxxxxxxx> wrote:
I wonder if you are missing the difference between 'declare' and
'define' in terms of headers. A header provides the compiler with
information about things. These bits of information are 'declarations'
and do not take up memory. In stdlib.h we find something like..

void *malloc(size_t);

This is a declaration and in fact a prototype. It is not a definition.

That's right. But the whole point of the preceding discussion was:
could an implementation put a definition (*not* just a declaration) of
malloc in stdlib.h?

--
Joe Wright
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---

.



Relevant Pages

  • Where Is __va_start Declared?
    ... Can anybody tell me where __va_start is declared in the Unix headers ... would be the most likely ones to bring in this declaration? ... process of porting all my CW code over to XCode (yeah, yeah, I know ... it on I began to get warnings on the following simple code segment at ...
    (comp.sys.mac.programmer.help)
  • Re: libstdc++.so.5 vs. libstdc++.so.6 and externa libraries
    ... > Here's the declaration that will compile on the linux machine, ... This declaration will not compile _by_itself_ because 'queue' has not ... C++ makes no claims WRT other headers. ... What compiler are you using on ...
    (comp.lang.cpp)
  • Re: Difference between module and form
    ... reference into every procedure call whether it is used or not, wasting a ... of memory and a Public variable is a shared reference variable, ... I can assure you that the compiler does nothing of the sort. ... usage of the executable and comparing the difference when the declaration ...
    (microsoft.public.vb.general.discussion)
  • Re: Quick question!
    ... I will try this new "Forward declaration" stuff you just tought me ... class components; // forward declaration ... you are just telling the compiler that there is a class called components. ... A good rule to follow with headers is: ...
    (microsoft.public.vc.language)
  • Re: variadic functions
    ... Standard headers. ... that a "free-hand" declaration of the contained functions. ... struct type declared? ... find other similar examples in other Standard headers -- and some ...
    (comp.lang.c)