OSS DDS implementation for embedded systems?

RTI (disclaimer, I work for RTI) also has a DDS implementation (Connext DDS Micro) optimized for small-footprint environments. See https://www.rti.com/products/micro. It is ANSI C and only has about 30000 lines of code. The heap memory footprint is also quite small. You an get some details on heap use here.

RTI Connext DDS Micro is available in source so you can build it for your own environment and it can also run in systems without an OS. Note that is not OSS as you wanted. However RTI offers no-cost licenses for Universities and qualified research projects so maybe it can still fit your need.