smfrpc / smf

Fastest RPC in the west

Home Page:http://smfrpc.github.io/smf/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use precise memory for handle callbacks for c++

emaxerrno opened this issue · comments

codegen:c++

...
private:
  std::vector<smf::rpc_service_method_handle> handles_;

should be followed by a handles_.reserve( $HandlesSize$ ); in the codegen

will will guarantee exact memory use.

in fact it shhould be a std::array<> since we know the size.