faydr / QMesh

QMesh: a synchronized flooded mesh network for voice over LoRa
GNU General Public License v3.0
150 stars 14 forks source link

Make large protobuf fields dynamically allocated #94

Closed faydr closed 3 years ago

faydr commented 3 years ago

Statically allocating all of these fields gets a little large after awhile, so let's instead make these fields dynamically allocated.

  1. Enable the PB_ENABLE_MALLOC preprocessor directive.
  2. Make all of the larger fields FT_POINTER in the .proto file.
  3. Make a SerialMsgObj wrapper object to make the allocation/deallocation of SerialMsg objects play well with C++'s smart pointers.
faydr commented 3 years ago

SerialMsg is now superseded by SerMsg, which works to have all of the messages dynamically allocated.