Skip to content
No description, website, or topics provided.
C++ Starlark Assembly Other
Branch: master
Clone or download

Latest commit

martijnvels and Copybara-Service Optimize Push/Pop inlined RSEQ code of tcmalloc
The old code had a hotspot for a partial flag update / stall from:

asm (.... "decl (scratch, cl, 8)" : ...)
(c++ code)
test overflow
jae ....

This code removes this by using LEA for decreasing the 'current' value. This has the additional effect that flags are no longer affected in the submit portion of the code, which means we can directly export the AE (or BE) flags as overflow/underflow.

The compiler then DTRT by turning the "if (underflow)" into a direct "jae ...." construct.

This is applied for both pop (underflow) and (push) overflow

PiperOrigin-RevId: 312185620
Change-Id: I121376bf295417fd8af8947278071ee105d826fd
Latest commit ed6617a May 19, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ci Update linux_clang-latest container to one based on Ubuntu 18.04, whi… Apr 9, 2020
docs Typo fixes May 5, 2020
tcmalloc Optimize Push/Pop inlined RSEQ code of tcmalloc May 19, 2020
.bazelrc Initial commit Feb 7, 2020
.gitignore Added a gitignore Feb 14, 2020
CONTRIBUTING.md Initial commit Feb 7, 2020
LICENSE Initial commit Feb 7, 2020
README.md Document expectations for Transparent Huge Pages Feb 26, 2020
WORKSPACE Removes instances of "linker initialized" objects May 4, 2020

README.md

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.

You can’t perform that action at this time.