revenge of CALLOC_STRUCT

Dave Airlie airlied at gmail.com
Wed Dec 29 00:46:02 UTC 2021


On Sun, 26 Dec 2021 at 20:37, Jose Fonseca <jfonseca at vmware.com> wrote:
>
> I believe that as long as the CALLOC_STRUCT continue to get paired with right FREE call (or equivalent if these get renamed) either way should work for us.  Whatever option proposed gets followed, there's a risk these can get out of balanced, but the risk seems comparable.
>
>
> For context, IIRC, the main reason these macros remain useful for VMware is the sad state of memory debugging tools on Windows.  AFAICT, best hope of one day deprecating this would be use AddressSanitizer, which is supported on MSVC [1], but unfortunately not yet on MinGW w/ GCC [2], and we rely upon a lot for day-to-day development, using Linux cross-compilation.  Using MinGW w/ Clang cross compiler seems be a way to overcome this difficulty, but that too was still in somewhat experimental state when I last tried it.
>
>

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14325

Is my attempt to rebalance things, there are a few current imbalance
I'd like to address before merging mesa/st code.

Dave.


More information about the mesa-dev mailing list