Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:15:54

0001 /*
0002     Copyright (c) 2005-2020 Intel Corporation
0003 
0004     Licensed under the Apache License, Version 2.0 (the "License");
0005     you may not use this file except in compliance with the License.
0006     You may obtain a copy of the License at
0007 
0008         http://www.apache.org/licenses/LICENSE-2.0
0009 
0010     Unless required by applicable law or agreed to in writing, software
0011     distributed under the License is distributed on an "AS IS" BASIS,
0012     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013     See the License for the specific language governing permissions and
0014     limitations under the License.
0015 */
0016 
0017 /*
0018 Replacing the standard memory allocation routines in Microsoft* C/C++ RTL
0019 (malloc/free, global new/delete, etc.) with the TBB memory allocator.
0020 
0021 Include the following header to a source of any binary which is loaded during
0022 application startup
0023 
0024 #include "tbb/tbbmalloc_proxy.h"
0025 
0026 or add following parameters to the linker options for the binary which is
0027 loaded during application startup. It can be either exe-file or dll.
0028 
0029 For win32
0030 tbbmalloc_proxy.lib /INCLUDE:"___TBB_malloc_proxy"
0031 win64
0032 tbbmalloc_proxy.lib /INCLUDE:"__TBB_malloc_proxy"
0033 */
0034 
0035 #ifndef __TBB_tbbmalloc_proxy_H
0036 #define __TBB_tbbmalloc_proxy_H
0037 
0038 #if _MSC_VER
0039 
0040 #ifdef _DEBUG
0041     #pragma comment(lib, "tbbmalloc_proxy_debug.lib")
0042 #else
0043     #pragma comment(lib, "tbbmalloc_proxy.lib")
0044 #endif
0045 
0046 #if defined(_WIN64)
0047     #pragma comment(linker, "/include:__TBB_malloc_proxy")
0048 #else
0049     #pragma comment(linker, "/include:___TBB_malloc_proxy")
0050 #endif
0051 
0052 #else
0053 /* Primarily to support MinGW */
0054 
0055 extern "C" void __TBB_malloc_proxy();
0056 struct __TBB_malloc_proxy_caller {
0057     __TBB_malloc_proxy_caller() { __TBB_malloc_proxy(); }
0058 } volatile __TBB_malloc_proxy_helper_object;
0059 
0060 #endif // _MSC_VER
0061 
0062 /* Public Windows API */
0063 extern "C" int TBB_malloc_replacement_log(char *** function_replacement_log_ptr);
0064 
0065 #endif //__TBB_tbbmalloc_proxy_H