memory_unittest_mac.mm 661 B

1234567891011121314151617181920212223
  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
  3. // found in the LICENSE file.
  4. #include "base/process/memory_unittest_mac.h"
  5. #include <CoreFoundation/CoreFoundation.h>
  6. namespace base {
  7. void* AllocateViaCFAllocatorSystemDefault(ssize_t size) {
  8. return CFAllocatorAllocate(kCFAllocatorSystemDefault, size, 0);
  9. }
  10. void* AllocateViaCFAllocatorMalloc(ssize_t size) {
  11. return CFAllocatorAllocate(kCFAllocatorMalloc, size, 0);
  12. }
  13. void* AllocateViaCFAllocatorMallocZone(ssize_t size) {
  14. return CFAllocatorAllocate(kCFAllocatorMallocZone, size, 0);
  15. }
  16. } // namespace base