CBFalconer said:
Dan Pop wrote:
malloc.h is non-standard, needless and probably deprecated as
well. All its functionality can be found in stdlib.h.
Avoid topics you have no clue about. The only correct part of
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
your statement is that malloc.h is non-standard. Because of
this, it cannot be deprecated (only standard features can).
And there is plenty of malloc.h functionality that cannot be
found in stdlib.h.
The following is malloc.h as found on my system. Please point
out the functionality that cannot be found in stdlib.h.
[snip]
On the other hand, I have a (very old) system whose <malloc.h>
contains declarations for a type called "struct mallinfo"
(containing information about the current state of the heap), a
function mallinfo() that returns a value of that type, and a
function mallopt() that presumably allows some control over the
inner workings of malloc(), free() and friends.
It's entirely non-standard (pre-standard, in fact), and I've
never felt the need to use it.