blob: 60deb1385f91bf2697564ffbb8d1d5caa9357460 [file] [log] [blame]
[email protected]9f958442010-03-19 18:42:411// Copyright (c) 2010 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// This file contains helpers for the process_util_unittest to allow it to fully
6// test the Mac code.
7
8#ifndef BASE_PROCESS_UTIL_UNITTEST_MAC_H_
9#define BASE_PROCESS_UTIL_UNITTEST_MAC_H_
[email protected]32b76ef2010-07-26 23:08:2410#pragma once
[email protected]9f958442010-03-19 18:42:4111
12#include "base/basictypes.h"
13
14namespace base {
15
16// Allocates memory via system allocators. Alas, they take a _signed_ size for
17// allocation.
[email protected]0281161c2010-05-14 15:43:0018void* AllocateViaCFAllocatorSystemDefault(ssize_t size);
19void* AllocateViaCFAllocatorMalloc(ssize_t size);
20void* AllocateViaCFAllocatorMallocZone(ssize_t size);
21
22#if !defined(ARCH_CPU_64_BITS)
23// See process_util_unittest_mac.mm for an explanation of why this function
24// isn't implemented for the 64-bit environment.
[email protected]9f958442010-03-19 18:42:4125
26// Allocates a huge Objective C object.
27void* AllocatePsychoticallyBigObjCObject();
28
[email protected]0281161c2010-05-14 15:43:0029#endif // !ARCH_CPU_64_BITS
30
31} // namespace base
[email protected]9f958442010-03-19 18:42:4132
33#endif // BASE_PROCESS_UTIL_UNITTEST_MAC_H_