memory_resource 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // -*- C++ -*-
  2. //===----------------------------------------------------------------------===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef _LIBCPP_MEMORY_RESOURCE
  10. #define _LIBCPP_MEMORY_RESOURCE
  11. /**
  12. memory_resource synopsis
  13. // C++17
  14. namespace std::pmr {
  15. class memory_resource;
  16. bool operator==(const memory_resource& a,
  17. const memory_resource& b) noexcept;
  18. bool operator!=(const memory_resource& a,
  19. const memory_resource& b) noexcept;
  20. template <class Tp> class polymorphic_allocator;
  21. template <class T1, class T2>
  22. bool operator==(const polymorphic_allocator<T1>& a,
  23. const polymorphic_allocator<T2>& b) noexcept;
  24. template <class T1, class T2>
  25. bool operator!=(const polymorphic_allocator<T1>& a,
  26. const polymorphic_allocator<T2>& b) noexcept;
  27. // Global memory resources
  28. memory_resource* set_default_resource(memory_resource* r) noexcept;
  29. memory_resource* get_default_resource() noexcept;
  30. memory_resource* new_delete_resource() noexcept;
  31. memory_resource* null_memory_resource() noexcept;
  32. // Pool resource classes
  33. struct pool_options;
  34. class synchronized_pool_resource;
  35. class unsynchronized_pool_resource;
  36. class monotonic_buffer_resource;
  37. } // namespace std::pmr
  38. */
  39. #include <__config>
  40. #include <__memory_resource/memory_resource.h>
  41. #include <__memory_resource/monotonic_buffer_resource.h>
  42. #include <__memory_resource/polymorphic_allocator.h>
  43. #include <__memory_resource/pool_options.h>
  44. #include <__memory_resource/synchronized_pool_resource.h>
  45. #include <__memory_resource/unsynchronized_pool_resource.h>
  46. #include <version>
  47. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  48. # pragma GCC system_header
  49. #endif
  50. #endif /* _LIBCPP_MEMORY_RESOURCE */