memory_unittest_mac.h 783 B

1234567891011121314151617181920212223242526
  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. // This file contains helpers for the process_util_unittest to allow it to fully
  5. // test the Mac code.
  6. #ifndef BASE_PROCESS_MEMORY_UNITTEST_MAC_H_
  7. #define BASE_PROCESS_MEMORY_UNITTEST_MAC_H_
  8. #include <stddef.h>
  9. #include <sys/types.h>
  10. #include "build/build_config.h"
  11. namespace base {
  12. // Allocates memory via system allocators. Alas, they take a _signed_ size for
  13. // allocation.
  14. void* AllocateViaCFAllocatorSystemDefault(ssize_t size);
  15. void* AllocateViaCFAllocatorMalloc(ssize_t size);
  16. void* AllocateViaCFAllocatorMallocZone(ssize_t size);
  17. } // namespace base
  18. #endif // BASE_PROCESS_MEMORY_UNITTEST_MAC_H_