Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
dcc63d74
Commit
dcc63d74
authored
Aug 03, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9248 from alalek:alloc_refactoring
parents
2f4a3e40
b46e741c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
5 deletions
+17
-5
CMakeLists.txt
CMakeLists.txt
+7
-0
CMakeLists.txt
modules/core/CMakeLists.txt
+10
-0
alloc.cpp
modules/core/src/alloc.cpp
+0
-0
precomp.hpp
modules/core/src/precomp.hpp
+0
-4
system.cpp
modules/core/src/system.cpp
+0
-1
No files found.
CMakeLists.txt
View file @
dcc63d74
...
...
@@ -551,6 +551,7 @@ if(UNIX)
endif
()
include
(
CheckFunctionExists
)
include
(
CheckIncludeFile
)
include
(
CheckSymbolExists
)
if
(
NOT APPLE
)
CHECK_INCLUDE_FILE
(
pthread.h HAVE_LIBPTHREAD
)
...
...
@@ -566,6 +567,12 @@ if(UNIX)
else
()
set
(
HAVE_LIBPTHREAD YES
)
endif
()
CHECK_SYMBOL_EXISTS
(
posix_memalign stdlib.h HAVE_POSIX_MEMALIGN
)
CHECK_INCLUDE_FILE
(
malloc.h HAVE_MALLOC_H
)
if
(
HAVE_MALLOC_H
)
CHECK_SYMBOL_EXISTS
(
memalign malloc.h HAVE_MEMALIGN
)
endif
()
endif
()
include
(
cmake/OpenCVPCHSupport.cmake
)
...
...
modules/core/CMakeLists.txt
View file @
dcc63d74
...
...
@@ -45,6 +45,16 @@ endif()
if
(
ITT_INCLUDE_DIRS
)
ocv_module_include_directories
(
${
ITT_INCLUDE_DIRS
}
)
endif
()
if
(
HAVE_POSIX_MEMALIGN
)
ocv_append_sourge_file_compile_definitions
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/alloc.cpp
"HAVE_POSIX_MEMALIGN=1"
)
endif
()
if
(
HAVE_MALLOC_H
)
ocv_append_sourge_file_compile_definitions
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/alloc.cpp
"HAVE_MALLOC_H=1"
)
endif
()
if
(
HAVE_MEMALIGN
)
ocv_append_sourge_file_compile_definitions
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/alloc.cpp
"HAVE_MEMALIGN=1"
)
endif
()
ocv_create_module
(
${
extra_libs
}
)
ocv_target_link_libraries
(
${
the_module
}
...
...
modules/core/src/alloc.cpp
View file @
dcc63d74
This diff is collapsed.
Click to expand it.
modules/core/src/precomp.hpp
View file @
dcc63d74
...
...
@@ -148,10 +148,6 @@ BinaryFunc getCopyMaskFunc(size_t esz);
/* maximal average node_count/hash_size ratio beyond which hash table is resized */
#define CV_SPARSE_HASH_RATIO 3
#if defined _WIN32
void
deleteThreadAllocData
();
#endif
inline
Size
getContinuousSize_
(
int
flags
,
int
cols
,
int
rows
,
int
widthScale
)
{
int64
sz
=
(
int64
)
cols
*
rows
*
widthScale
;
...
...
modules/core/src/system.cpp
View file @
dcc63d74
...
...
@@ -1541,7 +1541,6 @@ BOOL WINAPI DllMain(HINSTANCE, DWORD fdwReason, LPVOID lpReserved)
{
// Not allowed to free resources if lpReserved is non-null
// http://msdn.microsoft.com/en-us/library/windows/desktop/ms682583.aspx
cv
::
deleteThreadAllocData
();
cv
::
getTlsStorage
().
releaseThread
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment