Skip to content
master
Switch branches/tags
Code

Latest commit

Philipp Brüschweiler and Copybara-Service Add a new ringbuffer based transfer cache.
This is a copy of the existing transfer cache, but with the following changes:

* Handle inserts and removes of any size (<= num_to_move) equally well
* When returning entries to the freelist, preferrably return entries
  that are less likely to still reside in caches
* Don't store slot_info_ in an std::atomic anymore, as it is now 12 bytes big.
  Instead, only access it under a locked lock_.
* In `RemoveRange()`, if there are any items left in the transfercache, remove
  only the present ones instead of fetching missing ones from the freelist. If
  the caller insists on removing a fixed number of elements, they can call the
  method multiple times.

PiperOrigin-RevId: 385958935
Change-Id: Ie0230762d0476c8ee05e9e5cdd74b4208f1dc32b
0e9df31

Git stats

Files

Permalink
Failed to load latest commit information.

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. This also covers important operating system-level properties for improving TCMalloc performance.
  • 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.

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.

About

No description, website, or topics provided.

Resources

License

Releases

No releases published

Packages

No packages published