2011/5/6 Dylan Smith <dylan.ah.sm...@gmail.com>:
> +struct vertex_attrib_duplication {
> +    DWORD attrib;
> +    DWORD vertex_index;
> +    struct vertex_attrib_duplication *ptr;
> +};
...
> +            struct vertex_attrib_duplication **heads = NULL; /* head of list 
> for each vertex */

You probably want to use Wine lists (from include/wine/list.h) instead
of your own implementation.

> +            heads = HeapAlloc(GetProcessHeap(), 0, This->numvertices * 
> sizeof(*heads) + max_entries * sizeof(*duplications));
> +            duplications = (struct vertex_attrib_duplication *)(heads + 
> This->numvertices);

I'm not sure why you are usually sticking together many arrays in a
single allocation. Economizing on the number of HeapAllocs is not a
great reason IMHO.


Reply via email to