Mail Archives: djgpp/1993/05/08/16:57:41
In a strange fit of amnesia, Eric Backus wrote:
> The malloc() function is not reserved or defined by ANSI C. In
> theory, therefore, an ANSI C compiler must allow you to define a
> malloc() function (perhaps even one which has nothing to do with
> memory allocation), without breaking any ANSI C functions. I guess
> non-ANSI C functions could be affected, though.
This is of course false. ANSI C does indeed define malloc(), so you
can't just define your own unrelated malloc() that doesn't do memory
allocation.
> In practice, on a unix machine I have supplied alternate versions of
> malloc() to a program, and everything worked fine. I haven't tried
> with DJGPP, but I bet it would work fine.
Fortunately, this is still true.
--
Eric Backus
ericb AT lsid DOT hp DOT com
(206) 335-2495
- Raw text -