|
|
On Sunday, 12 June 2022 at 23:37:10 UTC+1 spitzak wrote:
Modern ones I think use (small) per-thread heaps. The problem then is that allocating and freeing in different threads loses the multithreading advantage of this and may result in locking anyway.
OK, that's interesting. I haven't looked at this aspect in a good while so had no idea what was really being done in practice now. I can see a per-thread heap being quite a neat way to duck the issue and that probably covers the majority of typical use cases.
But in this specific case, allocating in one thread then freeing in a different thread, it does seem like that will lead to some sort of synchronization, so I guess a lock does seem likely then. Which is a pity, as there are ways this could be made fully lock-free; though I admit they would probably be unnecessarily complex for the vast majority of cases!
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/14616b12-32f3-4927-b60a-ee5c929d5215n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |