diff options
author | b.kelemen@samsung.com <b.kelemen@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 22:07:03 +0000 |
---|---|---|
committer | b.kelemen@samsung.com <b.kelemen@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 22:07:03 +0000 |
commit | 29159eb9632e429325297bbc81acf13485845fa7 (patch) | |
tree | 76ef19107eed709d7dd948ba8b58b9776fc72404 /base/values.h | |
parent | 3c0dc353bbf83e7873c37fcb8d1cb25c6b8f472c (diff) | |
download | chromium_src-29159eb9632e429325297bbc81acf13485845fa7.zip chromium_src-29159eb9632e429325297bbc81acf13485845fa7.tar.gz chromium_src-29159eb9632e429325297bbc81acf13485845fa7.tar.bz2 |
Make possible to check memory allocations inside chromium
This patch implements UncheckedMalloc and UncheckedCalloc for Linux.
Previously it was only possible on Mac. The motivation is to let callers handle
OOM gracefully instead of aborting.
When tcmalloc is used this is implemented via a weak symbol that is overridden
by tcmalloc. This way we get around the problem that neither base cannot depend
on tcmalloc and vica versa. Unfortunately weak symbols are not supported on Windows.
To make that work on Windows one will have to do some build system craft that is similar
of what we do to replace the system malloc with tcmalloc.
This cl does not try to solve the more controversial problem of disallowing
the OOM handler for third party libraries under special circumstances.
BUG=73751
Review URL: https://codereview.chromium.org/55333002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258681 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/values.h')
0 files changed, 0 insertions, 0 deletions