Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #146386
| From | Florian Weimer <fw@deneb.enyo.de> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: realloc() and POSIX threads |
| Date | 2019-09-28 09:27 +0200 |
| Message-ID | <877e5szxrd.fsf@mid.deneb.enyo.de> (permalink) |
| References | <qmlv0b$bt0$1@news.albasani.net> |
* Doug Weiman: > Is there a way to implement the scenario above (memory > allocation, thread creation, memory reallocation) safely, so that the > thread can be guaranteed to still have access to valid memory? One could > use thread mutexes, but that would effectively serialize things. There are transactional memory techniques that can avoid atomic writes on the reader side, but they involve a custom memory allocator that ensures that access to the memory region never has side effects (even after deallocation), and they also need widely implemented compiler extensions to avoid undefined behavior due to the data races and aliasing violations. Read-copy-update is another technique that can avoid synchronization costs.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
realloc() and POSIX threads Doug Weiman <no@nyet.net> - 2019-09-27 21:29 +0000
Re: realloc() and POSIX threads Robert Wessel <robertwessel2@yahoo.com> - 2019-09-27 17:11 -0500
Re: realloc() and POSIX threads Florian Weimer <fw@deneb.enyo.de> - 2019-09-28 09:27 +0200
Re: realloc() and POSIX threads Melzzzzz <Melzzzzz@zzzzz.com> - 2019-09-28 08:42 +0000
Re: realloc() and POSIX threads "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2019-09-28 03:53 -0700
Re: realloc() and POSIX threads "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2019-09-28 03:55 -0700
Re: realloc() and POSIX threads Richard Damon <Richard@Damon-Family.org> - 2019-09-28 08:29 -0400
Re: realloc() and POSIX threads Doug Weiman <no@nyet.net> - 2019-09-28 15:06 +0000
Re: realloc() and POSIX threads "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2019-09-28 15:19 -0700
Re: realloc() and POSIX threads "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2019-09-28 15:23 -0700
csiph-web