José Fonseca wrote:
> Hi,
> 
> I'd like to fix the naming collisions for the memory allocation utility
> macros/functions between gallium & mesa, especially the MALLOC, CALLOC,
> CALLOC_STRUCT, FREE, and REALLOC macros in u_memory.[ch].
> 
> The main motivation is to be able to use the memory debugging functions
> debug_malloc, etc instead of the standard library's ones.  The mesa
> based state tracker sometimes frees mesa structures (allocated with
> malloc), with debug_free, and probably vice versa.

The simplest thing for now might be to go through 
src/mesa/state_tracker/ and use the _mesa_malloc(), _mesa_free(), etc 
wrappers everywhere.

Would that do the trick, or do you need the macro wrappers for Windows 
in that area too?

I don't think we need to use any of the gallium memory functions in the 
Mesa state tracker.


> I don't have any particular preference for Gallium memory allocation
> functions, as long as they are different from mesa. We could go for the
> trend of prefixing with the module name (util_malloc, util_free, etc).
> Or we could go for using some Gallium globally unique prefix
> (ga3d_malloc, or ga_malloc). What you do you think?

-Brian

------------------------------------------------------------------------------
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to