Tell HN: C Experts Panel – Ask us anything about C
(1) Explain just how malloc() and free() work <i>under the covers</i> and the implications for multi-threading, <i>memory leaks</i>, virtual memory paging, etc.<p>Maybe also cover some means, algorithms, and code for reporting on the <i>state</i>, status, etc. of the memory use by malloc() and free().<p>By the way, I know and have known well for longer than most C programmers have lived JUST what the <i>heap</i> data structure, as used in &quot;heap sort&quot;, is.  But what is the meaning of &quot;the heap&quot; in C programming language documentation?<p>(2) Cover in overwhelmingly fine detail the &quot;stack&quot; and the chuckhole in the road, <i>stack overflow</i>.<p>(3) Where to get a reliable package for a reasonable package of code for handling character strings -- what I saw and worked with in C is not reasonable.<p>(4) From the C programming I did, it looks like a large C program for significant work involves some hundreds, maybe tens of thousands, of <i>includes</i>, <i>inserts</i>, whatever, and what a linkage editor would call <i>external references</i>.  There must somewhere be some tools to help a programmer make sense of all those includes and references, the resulting memory maps, issues of locality of reference, <i>word boundary alignment</i>, etc.<p>(5)How can C exploit a processor with 64 bit addressing and main memory in the tens of gigabytes and maybe terabytes?<p>(6) How can C support, i.e., exploit, integers and IEEE floating point in 64 and&#x2F;or 128 bit lengths?<p>(7) How to handle exceptional conditions with, say, non-local gotos and without danger of memory leaks?<p>(8) Sorry, but far and away my favorite programming language long has been and remains PL&#x2F;I, especially for its scope of names rules, handling of aggregates with external scope, its <i>data structures</i>, and its exceptional conditional handling with non-local gotos and freeing <i>automatic</i> storage and, thus, avoiding <i>memory leaks</i>.  Of course I can&#x27;t use PL&#x2F;I now, but the problems PL&#x2F;I solved are still with us, also when writing C code.  So, how to solve these problems with C code?<p>(9) For C++, please explain how that works <i>under the covers</i>.  E.g., some years ago it appeared the C++ was defined as only a source code pre-processor to C.  Is this still the case?  If so, then explaining C++ <i>under the covers</i> should be feasible and valuable.