Files
Chris Kennelly CA 27112c82fb Fold CentralFreeList's StaticForwarder into StaticForwarder.
The out-of-line definitions in central_freelist.cc become inline members of
the template, so central_freelist.cc is deleted.  central_freelist.h forward
declares StaticForwarder, since static_forwarder.h depends on it via
parameters.h.

The StaticForwarderSpanTest cases, previously moved to
static_forwarder_test.cc, are retargeted to the production forwarder.  The
small-but-slow TransferCacheManager is templated on its forwarder, as the
default one is, so that CentralFreeList's members are only instantiated where
used.

PiperOrigin-RevId: 998314669
2026-10-12 19:52:59 -07:00
..
2021-11-24 20:42:45 +00:00
2021-11-24 20:42:45 +00:00
2024-12-23 19:10:04 -08:00
2026-07-09 08:36:46 -07:00
2021-11-24 20:42:45 +00:00
2021-11-24 20:42:45 +00:00
2024-08-27 09:10:16 -07:00
2025-05-12 13:06:09 -07:00
2024-12-23 19:10:04 -08:00
2026-02-24 09:57:38 -08:00
2026-08-20 01:50:24 -07:00
2023-09-26 09:54:32 -07:00

TCMalloc

This repository contains the TCMalloc C++ code.

TCMalloc is Google's customized implementation of C's malloc() and C++'s operator new used for memory allocation within our C and C++ code. TCMalloc is a fast, multi-threaded malloc implementation.

Building TCMalloc

Bazel is the official build system for TCMalloc.

The TCMalloc Platforms Guide contains information on platform support for TCMalloc.

Documentation

All users of TCMalloc should consult the following documentation resources:

  • The TCMalloc Quickstart covers downloading, installing, building, and testing TCMalloc, including incorporating within your codebase.
  • The TCMalloc Overview covers the basic architecture of TCMalloc, and how that may affect configuration choices.
  • The TCMalloc Reference covers the C and C++ TCMalloc API endpoints.

More advanced usages of TCMalloc may find the following documentation useful:

  • The TCMalloc Tuning Guide covers the configuration choices in more depth, and also illustrates other ways to customize TCMalloc.
  • The TCMalloc Design Doc covers how TCMalloc works underneath the hood, and why certain design choices were made. Most developers will not need this level of implementation detail.
  • The TCMalloc Compatibility Guide which documents our expectations for how our APIs are used.
  • The history and differences between this repository and gperftools.

Publications

We've published several papers relating to TCMalloc optimizations:

License

The TCMalloc library is licensed under the terms of the Apache license. See LICENSE for more information.

Disclaimer: This is not an officially supported Google product.