Page 2 of 2

Re: [SOLVED] Internal Kernel Pseudo-Garbage Collection

Posted: Thu Sep 04, 2014 5:23 am
by Wajideu
max wrote:
DaemonR wrote:malloc.h is not included in the list of standard headers, nor is the implementation for malloc defined within the document.
What?! What list of standard headers? I hope you are aware that every C library has its own headers that just follow the standards defined in the C standard, to provide an interface that is compliant to the C standard
Yes, I know. He's trying to tell me that I'm wrong; that malloc is part of the C standard when it's not. Most C libraries may include it, but it's not part of the standard. There are even alternatives to it like talloc.


EDIT:
Cross out what I've said. Apparently, it was my misunderstanding when the malloc header was removed in the C89 specification that malloc didn't go with it.

Sorry for the arrogance.

Re: [SOLVED] Internal Kernel Pseudo-Garbage Collection

Posted: Thu Sep 04, 2014 5:28 am
by mallard
DaemonR wrote:
max wrote:
DaemonR wrote:malloc.h is not included in the list of standard headers, nor is the implementation for malloc defined within the document.
What?! What list of standard headers? I hope you are aware that every C library has its own headers that just follow the standards defined in the C standard, to provide an interface that is compliant to the C standard
Yes, I know. He's trying to tell me that I'm wrong; that malloc is part of the C standard when it's not. Most C libraries may include it, but it's not part of the standard. There are even alternatives to it like talloc.
http://www.open-std.org/jtc1/sc22/wg14/ ... /n1570.pdf, Page 349 (367 in the PDFs numbering): "7.22.3.4 The malloc function".

Re: malloc (was: Internal Kernel Pseudo-Garbage Collection)

Posted: Thu Sep 04, 2014 5:58 am
by Wajideu
@mallard I already stated I was wrong and apologized.


My misunderstanding is like most of my problems the result of my inherent will to do simple things in crazy ways. When I first became interested in the C standard, I downloaded every version of it I could find to read chronologically. I can't remember where I found them, but there were several documents that I hunted down which were pre-C89. I read those first, then only paid attention to the changes between each specification. While I knew there was still sample code for the malloc function within the specification, I was under the assumption it was just an optional extension to the standard seeing as how the header was removed in C89, yet most toolchains still had it.

Re: malloc (was: Internal Kernel Pseudo-Garbage Collection)

Posted: Thu Sep 04, 2014 6:08 am
by mallard
DaemonR wrote:@mallard I already stated I was wrong and apologized.
If you look at the post times, I posted (very) shortly before you apologized. (My edit to add the PDF page number has the same timestamp as your edit to apologise.)