Using boost in embedded system with memory limitation

前端 未结 6 845
夕颜
夕颜 2021-01-04 19:01

We are using c++ to develop an application that runs in Windows CE 4 on an embedded system.

One of our constraint is that all the memory used by the application shal

6条回答
  •  春和景丽
    2021-01-04 19:11

    You could write your own allocator for the container, which allocates from a fixed size static buffer. Depending on the usage patterns of the container the allocator could be as simple as incrementing a pointer (e.g. when you only insert stuff into the container once at app startup, and don't continuously add/remove elements.)

提交回复
热议问题