Custom Memory Allocation

I want to use a custom allocator with SDL but I can’t seem to find a way to do it (e.g. al_set_memory_interface if this were Allegro).

Is this possible? If so, how can I override SDL_malloc etc. with my own implementations in a cross-platform way?

Is this so you can write your own garbage collection and prevent out of memory failures? If so, I can give some pointers, as I’ve done this myself.