I know this isn't REALLY a Perl question, but I find it quite interesting anyways:

According to p. 55 of "Advanced Perl Programming" malloc is not reentrant and the implication the book lists is that if one is calling a function and the program receives a signal which calls the same function "the function gets totally confused and is likely to crash the system."
What exactly does this mean?
If ANY program is in a malloc block and a hardware interrupt occurs and the interrupt handler uses malloc, do problems occur? Or do interrupt handlers not use malloc then.
I suppose I would like to know why there is a problem w/ malloc ONLY in the specific case Sriram Srinivasan listed.


thanks.

I get the feeling I slept through an important lecture a while ago :)

In reply to Malloc is not reentrant? by floopy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.