malloc (was: Internal Kernel Pseudo-Garbage Collection)

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Wajideu
Member
Member
Posts: 153
Joined: Wed Jul 30, 2014 1:05 am

Re: [SOLVED] Internal Kernel Pseudo-Garbage Collection

Post 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.
Last edited by Wajideu on Thu Sep 04, 2014 5:29 am, edited 1 time in total.
mallard
Member
Member
Posts: 280
Joined: Tue May 13, 2014 3:02 am
Location: Private, UK

Re: [SOLVED] Internal Kernel Pseudo-Garbage Collection

Post 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".
Last edited by mallard on Thu Sep 04, 2014 5:29 am, edited 1 time in total.
Image
User avatar
Wajideu
Member
Member
Posts: 153
Joined: Wed Jul 30, 2014 1:05 am

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

Post 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.
mallard
Member
Member
Posts: 280
Joined: Tue May 13, 2014 3:02 am
Location: Private, UK

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

Post 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.)
Image
Post Reply