google / tcmalloc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

System requirements for tcmalloc

lgacnik opened this issue · comments

The following question is of informative nature.

I'm looking for an effective, preferably faster, and less time-deterministic alternative to malloc() memory allocator. I'm targetting use in C++ where code runs on a freestanding (no underlying operating system) implementation on a memory constrained device (microcontroller device with up to 1Mbyte of RAM/FLASH and sub-gigahertz frequency of CPU operation speed). Additionally I would be using such a memory allocation mechanism in combination with a pre-allocated (statically, at compile time, fixed-size container) memory and not dynamic (on heap) memory.

Therefore I'm asking whether tcmalloc is a suitable component for integration in such a system?

TCMalloc is not meant for heavily resource-constrained environments. A typical program will have several MBs of metadata for TCMalloc in excess of your available RAM.