OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/process_util_unittest_mac.h" | 5 #include "base/process/memory_unittest_mac.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 #include <CoreFoundation/CoreFoundation.h> | 8 #include <CoreFoundation/CoreFoundation.h> |
9 | 9 |
10 #if !defined(ARCH_CPU_64_BITS) | 10 #if !defined(ARCH_CPU_64_BITS) |
11 | 11 |
12 // In the 64-bit environment, the Objective-C 2.0 Runtime Reference states | 12 // In the 64-bit environment, the Objective-C 2.0 Runtime Reference states |
13 // that sizeof(anInstance) is constrained to 32 bits. That's not necessarily | 13 // that sizeof(anInstance) is constrained to 32 bits. That's not necessarily |
14 // "psychotically big" and in fact a 64-bit program is expected to be able to | 14 // "psychotically big" and in fact a 64-bit program is expected to be able to |
15 // successfully allocate an object that large, likely reserving a good deal of | 15 // successfully allocate an object that large, likely reserving a good deal of |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 void* AllocateViaCFAllocatorMalloc(ssize_t size) { | 51 void* AllocateViaCFAllocatorMalloc(ssize_t size) { |
52 return CFAllocatorAllocate(kCFAllocatorMalloc, size, 0); | 52 return CFAllocatorAllocate(kCFAllocatorMalloc, size, 0); |
53 } | 53 } |
54 | 54 |
55 void* AllocateViaCFAllocatorMallocZone(ssize_t size) { | 55 void* AllocateViaCFAllocatorMallocZone(ssize_t size) { |
56 return CFAllocatorAllocate(kCFAllocatorMallocZone, size, 0); | 56 return CFAllocatorAllocate(kCFAllocatorMallocZone, size, 0); |
57 } | 57 } |
58 | 58 |
59 } // namespace base | 59 } // namespace base |
OLD | NEW |