Yes, the compiler sees all the source code for all translation units. And through all the intermediate operations on the original pointer to the 'buffer' object (passing it between functions, algorithms for adding/removing the pointer from software queues, etc.), ultimately, this address... is simply written to one of the DMA controller registers. What the DMA does next is, of course, unknown to the compiler.