]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // heap_memory.hpp --------------------------------------------------------------// |
2 | ||
3 | // Copyright 2010 Vicente J. Botet Escriba | |
4 | // Copyright 2015 Andrey Semashev | |
5 | ||
6 | // Distributed under the Boost Software License, Version 1.0. | |
7 | // See http://www.boost.org/LICENSE_1_0.txt | |
8 | ||
9 | ||
10 | #ifndef BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP | |
11 | #define BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP | |
12 | ||
13 | #include <boost/detail/winapi/basic_types.hpp> | |
14 | ||
15 | #ifdef BOOST_HAS_PRAGMA_ONCE | |
16 | #pragma once | |
17 | #endif | |
18 | ||
19 | #if !defined( BOOST_USE_WINDOWS_H ) | |
20 | #undef HeapAlloc | |
21 | extern "C" { | |
22 | BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI | |
23 | GetProcessHeap(BOOST_DETAIL_WINAPI_VOID); | |
24 | ||
25 | BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI | |
26 | GetProcessHeaps(boost::detail::winapi::DWORD_ NumberOfHeaps, boost::detail::winapi::PHANDLE_ ProcessHeaps); | |
27 | ||
28 | BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI | |
29 | HeapCreate( | |
30 | boost::detail::winapi::DWORD_ flOptions, | |
31 | boost::detail::winapi::SIZE_T_ dwInitialSize, | |
32 | boost::detail::winapi::SIZE_T_ dwMaximumSize); | |
33 | ||
34 | BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI | |
35 | HeapDestroy(boost::detail::winapi::HANDLE_ hHeap); | |
36 | ||
37 | BOOST_SYMBOL_IMPORT boost::detail::winapi::LPVOID_ WINAPI | |
38 | HeapAlloc( | |
39 | boost::detail::winapi::HANDLE_ hHeap, | |
40 | boost::detail::winapi::DWORD_ dwFlags, | |
41 | boost::detail::winapi::SIZE_T_ dwBytes); | |
42 | ||
43 | BOOST_SYMBOL_IMPORT boost::detail::winapi::LPVOID_ WINAPI | |
44 | HeapReAlloc( | |
45 | boost::detail::winapi::HANDLE_ hHeap, | |
46 | boost::detail::winapi::DWORD_ dwFlags, | |
47 | boost::detail::winapi::LPVOID_ lpMem, | |
48 | boost::detail::winapi::SIZE_T_ dwBytes); | |
49 | ||
50 | BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI | |
51 | HeapFree( | |
52 | boost::detail::winapi::HANDLE_ hHeap, | |
53 | boost::detail::winapi::DWORD_ dwFlags, | |
54 | boost::detail::winapi::LPVOID_ lpMem); | |
55 | } | |
56 | #endif | |
57 | ||
58 | namespace boost { | |
59 | namespace detail { | |
60 | namespace winapi { | |
61 | using ::GetProcessHeap; | |
62 | using ::GetProcessHeaps; | |
63 | using ::HeapCreate; | |
64 | using ::HeapDestroy; | |
65 | using ::HeapAlloc; | |
66 | using ::HeapReAlloc; | |
67 | using ::HeapFree; | |
68 | } | |
69 | } | |
70 | } | |
71 | ||
72 | #endif // BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP |