Re: Can I Trust Pointer Arithmetic In Re-Allocated Memory?



"Bill Reid" <hormelfree@xxxxxxxxxxxxxxxx> writes:
[...]
As an orthogonal point, what horrible things happen if you try
to free() a NULL pointer?

Nothing; free(NULL) is guaranteed to be a no-op.

Either your system's documentation or any decent C textbook should
tell you this. Failing that, you can download a copy of the latest
draft of the C standard; search for "n1124.pdf".

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.



Relevant Pages

  • Re: what is atoi( )
    ... could you please explain wat atoi() function is for and an example ... your C textbook, or your system's documentation, or do a Google ... Keith Thompson kst-u@xxxxxxx ...
    (comp.lang.c)
  • Re: More fedora website errors
    ... no. I'm trying to gather a list of decent ... documentation that is Fedora-specific. ... To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list ...
    (Fedora)
  • Re: Pointer initialization and usage.
    ... It works by its author having read the applicable documents (a C textbook, and the particular compiler's documentation) and learning from them. ... have an appropriate newsgroups line in your header for your mail to be seen, ...
    (comp.lang.c.moderated)
  • SharePoint Developer Documentation
    ... Check out the hands-on labs. ... decent start. ... >Anyone know any good documentation on SharePoint Portal ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Want a Data Center Job
    ... IBM has a new textbook out, ... Seems like a decent overview...perhaps it's time I looked at ... Prev by Date: ...
    (comp.lang.cobol)