On 20 March 2016 at 23:07, Gabríel Arthúr Pétursson gabriel@system.is wrote:
On Sun, Mar 20, 2016 at 9:50 PM, Henri Verbeet hverbeet@gmail.com wrote:
Why do you think this is a good idea?
This removes the need for custom allocators.
It's particularly helpful in my work to add Vulkan support where I can map Vulkan handles to custom allocators passed in by an application for host memory allocations when creating said handle. Since allocation of host memory by the driver has to go through these custom allocators, if provided, I saw only two options:
- Add a userdata parameter to rbtree's allocators, or,
- Remove them since we know there's a small upper bound on the stack
size needed.
I opted for the second option due to its simplicity.
Hope this answers your question!
Could you give an example of how you're using this, and perhaps a reference to the relevant documentation? Either way, this would make struct wine_rb_tree a lot larger, and I don't think we want that.