I work with some batch data. I created structures for storing batch data. These structures were generated by python for a specific network protocol.
The problem is that due to the compiler aligning the structures, when I send data via the network protocol, the message ends longer than I would like. This causes the other device to not recognize the command.
Does anyone know if it is possible to do this so that my packers are exactly the size that the structure should be or is there a way to disable memory alignment?
c compiler-optimization gcc compiler-construction memory-alignment
Edwin
source share