Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Daniel Krügler<daniel.kruegler@googlemail.com> |
|---|---|
| Newsgroups | comp.std.c++ |
| Subject | Re: get_temporary_buffer synopsis |
| Date | 2012-03-06 08:50 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <jj1s72$mbm$1@dont-email.me> (permalink) |
| References | <jiq55h$ldo$1@news2.ipartners.pl> |
On 2012-03-04 23:24, Krzysztof Żelechowski wrote: > Why does get_temporary_buffer take a signed argument for size? > Why is return_temporary_buffer so awkwardly named? The usual connotation > for "return" is to provide something, not to release something. > Why is there no exception-safe handler for temporary buffers? The "temporary buffer" API is one example of interface, that presumably should never have been standardized. It was part of the original HP library and the basic idea was that it should allow implementations to provide a very low-level wrapper to get access to some memory that can be accessed without need to actually increase the currently reserved heap memory buffer e.g. of malloc. Such small memory buckets can be very useful for some algorithms that can get a significant performance win if such a buffer is available. The experiment failed, because no vendor did anything else but call malloc here, so the advantages of the interface did only exist theoretically. In addition, the usage requires very careful programming on the user-side. There exists the suggestion to deprecate the temporary buffer API for the next standard revision, in this case there would not be much need for providing further fixes to the broken API. HTH& Greetings from Bremen, Daniel Krügler -- [ comp.std.c++ is moderated. To submit articles, try posting with your ] [ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.std.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
get_temporary_buffer synopsis Krzysztof Żelechowski <giecrilj@stegny.2a.pl> - 2012-03-04 14:24 -0800
Re: get_temporary_buffer synopsis Daniel Krügler<daniel.kruegler@googlemail.com> - 2012-03-06 08:50 -0800
Re: get_temporary_buffer synopsis Krzysztof Żelechowski <giecrilj@stegny.2a.pl> - 2012-03-15 18:37 -0700
csiph-web