[PATCH] include: Use fixed stack size for rbtree.

Henri Verbeet hverbeet at gmail.com
Sun Mar 20 17:18:47 CDT 2016


On 20 March 2016 at 23:07, Gabríel Arthúr Pétursson <gabriel at system.is> wrote:
> On Sun, Mar 20, 2016 at 9:50 PM, Henri Verbeet <hverbeet at 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:
>
>  1) Add a userdata parameter to rbtree's allocators, or,
>  2) 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.



More information about the wine-devel mailing list