Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbbmalloc_proxy.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2005-2019 Intel Corporation
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16 
17 
18 
19 */
20 
21 /*
22 Replacing the standard memory allocation routines in Microsoft* C/C++ RTL
23 (malloc/free, global new/delete, etc.) with the TBB memory allocator.
24 
25 Include the following header to a source of any binary which is loaded during
26 application startup
27 
28 #include "tbb/tbbmalloc_proxy.h"
29 
30 or add following parameters to the linker options for the binary which is
31 loaded during application startup. It can be either exe-file or dll.
32 
33 For win32
34 tbbmalloc_proxy.lib /INCLUDE:"___TBB_malloc_proxy"
35 win64
36 tbbmalloc_proxy.lib /INCLUDE:"__TBB_malloc_proxy"
37 */
38 
39 #ifndef __TBB_tbbmalloc_proxy_H
40 #define __TBB_tbbmalloc_proxy_H
41 
42 #if _MSC_VER
43 
44 #ifdef _DEBUG
45  #pragma comment(lib, "tbbmalloc_proxy_debug.lib")
46 #else
47  #pragma comment(lib, "tbbmalloc_proxy.lib")
48 #endif
49 
50 #if defined(_WIN64)
51  #pragma comment(linker, "/include:__TBB_malloc_proxy")
52 #else
53  #pragma comment(linker, "/include:___TBB_malloc_proxy")
54 #endif
55 
56 #else
57 /* Primarily to support MinGW */
58 
59 extern "C" void __TBB_malloc_proxy();
63 
64 #endif // _MSC_VER
65 
66 /* Public Windows API */
67 extern "C" int TBB_malloc_replacement_log(char *** function_replacement_log_ptr);
68 
69 #endif //__TBB_tbbmalloc_proxy_H
void __TBB_malloc_proxy()
int TBB_malloc_replacement_log(char ***function_replacement_log_ptr)
struct __TBB_malloc_proxy_caller __TBB_malloc_proxy_helper_object

Copyright © 2005-2019 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.