The right function was called, from the wrong library
A service links a vendored allocator for its own use and also links a third-party SDK that calls `malloc` internally. After a deployment that changed nothing but link order, memory usage doubles and the vendored allocator's statistics show almost no traffic.
Every call to malloc from application code goes to the vendored allocator. Every call from the SDK goes to the system allocator. Both were compiled against the same header, both resolve at run time, neither reports an error. Under LD_PRELOAD of a third allocator, all of it moves again.
Nothing in the compiler ran differently. Name the stage that decided which definition each call reaches, and name the moment it decided — build time or process start. Then predict what nm will show for the SDK object and what the dynamic symbol table will show for the executable.