allocator_stub.h revision eb525c5499e34cc9c4b825d6d9e75bb07cc06ace
1// Copyright 2013 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef THIRD_PARTY_LIBJINGLE_OVERRIDES_ALLOCATOR_SHIM_ALLOCATOR_STUB_H_ 6#define THIRD_PARTY_LIBJINGLE_OVERRIDES_ALLOCATOR_SHIM_ALLOCATOR_STUB_H_ 7 8#include <new> 9 10#include "base/basictypes.h" 11 12#if !defined(OS_MACOSX) && !defined(OS_ANDROID) 13 14typedef void* (*AllocateFunction)(std::size_t); 15typedef void (*DellocateFunction)(void*); 16 17// The stub implementations that forward new / delete calls to the allocator 18// in the current binary (i.e. tcmalloc). 19void* Allocate(std::size_t n); 20void Dellocate(void* p); 21 22#endif // OS_MACOSX && OS_ANDROID 23 24#endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_ALLOCATOR_SHIM_ALLOCATOR_STUB_H_ 25