Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | James Kuyper <jameskuyper@verizon.net> |
| Newsgroups | comp.lang.c |
| Subject | Re: What standard library functions must deal with allocated memory? |
| Date | Mon, 23 Apr 2012 14:17:55 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 15 |
| Message-ID | <4F959CD3.60701@verizon.net> (permalink) |
| References | <4f9598df$0$20194$426a74cc@news.free.fr> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| Injection-Info | mx04.eternal-september.org; posting-host="2P71cupDoazVVolqpw1jrw"; logging-data="11484"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/u4agOD9ni7H6/lUbTQwj2dVvxl+WnPFs=" |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111220 Thunderbird/9.0 |
| In-Reply-To | <4f9598df$0$20194$426a74cc@news.free.fr> |
| Cancel-Lock | sha1:yL5QOAEK8Rab9j1i9s9/10PBr4A= |
| Xref | csiph.com comp.lang.c:19840 |
Show key headers only | View raw
On 04/23/2012 02:01 PM, Francois Grieu wrote: > I'm trying to list all the standard C99/C2011 library functions that, by > design, must deal with allocated memory in any way. > > I've seen calloc malloc realloc free. Is there any other? > If strdup was a standard function (it is not), it would be in my list. In C2011, add aligned_alloc(). Otherwise, your list is complete. Note that the rules for fopen() and fclose() are written in such a way that the FILE* objects they return, or the buffers managed by those objects, could be dynamically allocated, though not necessarily by the malloc() family. The behavior is undefined if you make any use of a FILE* returned by fopen(), after it has been passed to fclose(), as would naturally be the case if it were allocated by a call to malloc().
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What standard library functions must deal with allocated memory? Francois Grieu <fgrieu@gmail.com> - 2012-04-23 20:01 +0200
Re: What standard library functions must deal with allocated memory? James Kuyper <jameskuyper@verizon.net> - 2012-04-23 14:17 -0400
Re: What standard library functions must deal with allocated memory? Francois Grieu <fgrieu@gmail.com> - 2012-04-23 20:37 +0200
Re: What standard library functions must deal with allocated memory? Barry Schwarz <schwarzb@dqel.com> - 2012-04-23 12:26 -0700
Re: What standard library functions must deal with allocated memory? Keith Thompson <kst-u@mib.org> - 2012-04-23 14:04 -0700
Re: What standard library functions must deal with allocated memory? Robert Wessel <robertwessel2@yahoo.com> - 2012-04-23 17:15 -0500
Re: What standard library functions must deal with allocated memory? Francois Grieu <fgrieu@gmail.com> - 2012-04-23 23:18 +0200
Re: What standard library functions must deal with allocated memory? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-04-23 21:55 -0400
Re: What standard library functions must deal with allocated memory? Quentin Pope <nospam@nospam.invalid> - 2012-04-24 02:07 +0000
Re: What standard library functions must deal with allocated memory? Dr Nick <3-nospam@temporary-address.org.uk> - 2012-04-24 07:05 +0100
Re: What standard library functions must deal with allocated memory? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-04-24 00:38 -0700
Re: What standard library functions must deal with allocated memory? Keith Thompson <kst-u@mib.org> - 2012-04-24 22:24 -0700
Re: What standard library functions must deal with allocated memory? pete <pfiland@mindspring.com> - 2012-04-25 08:04 -0400
Re: What standard library functions must deal with allocated memory? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-04-28 04:09 -0700
Re: What standard library functions must deal with allocated memory? Stephen Sprunk <stephen@sprunk.org> - 2012-04-25 01:19 -0500
Re: What standard library functions must deal with allocated memory? pete <pfiland@mindspring.com> - 2012-04-25 07:55 -0400
Re: What standard library functions must deal with allocated memory? gordonb.ho66c@burditt.org (Gordon Burditt) - 2012-04-27 20:44 -0500
csiph-web