Comments (17)
Ok, I'll try develop.
from rpmalloc.
If it helps, you can get my full test by building the following:
https://github.com/brandon-kohn/simulation_toolkit/tree/feature/rpmalloc
from rpmalloc.
Are you using the malloc/free and new/delete wrappers? If so, that could be the issue, try only building the core lib with only rpmalloc.c
You can also try the latest develop branch to see if the problem persists. I noticed a couple of issues in the 1.2.2 release that I've fixed, and I'm preparing a new 1.3.0 release but it's still a couple of days away.
from rpmalloc.
But the usage seems ok, the important part is the rpmalloc_initialize/rpmalloc_finalize completely encompassing the use of the library, and that each thread has rpmalloc_thread_initialize/rpmalloc_thread_finalize on entry/exit.
from rpmalloc.
Also, if you could post a callstack of an access violation that would be helpful
from rpmalloc.
Actually, if you could try the release/1.3.0 branch it would be really helpful
from rpmalloc.
It happens in that branch. I'm trying to get a stack, but it only happens in my optimized build. It's a structured exception caused by an integer being divided by zero if that helps. The exception is thrown from rpmalloc. I only compile rpmalloc.c in my version of the lib.
from rpmalloc.
Another note is that if I put a sleep between the thread pool initialization (thus the calls of rpmalloc_thread_initialize) and the first call to rpmalloc, the issue doesn't seem to happen. This might suggest a data race between the thread initialization and something under the rpmalloc call.
from rpmalloc.
Thanks, I will try to replicate the issue using your repo
from rpmalloc.
Can't seem to get boost, cmake and your repo to play nice on my system (I never use neither boost nor cmake normally). It fails to find boost in the libcds cmake step. Also, is googletest supposed to build using mingw/gcc?
from rpmalloc.
If you're using the sudo command to build it.. be sure to use the -E
switch to bring the BOOST_ROOT environment over. That got me a lot, so maybe it applies to your situation. I think you can build it however you like. I've built it on gcc linux, visual studio, and xcode. All of it should just work.
from rpmalloc.
It doesn't seem to work on my Windows machine, I run the b2 builder with the arguments listed in your readme, point BOOST_ROOT to C:\Boost and run update.bat
D:\simulation_toolkit>set BOOST_ROOT=C:\Boost
D:\simulation_toolkit>update.bat d:\simulation_toolkit_install Ninja
From https://github.com/brandon-kohn/simulation_suite
* branch HEAD -> FETCH_HEAD
Already up-to-date.
-- Configuring done
-- Generating done
-- Build files have been written to: D:/simulation_toolkit/cmake.build.release/googletest-download
[1/6] Performing update step for 'googletest'
Current branch master is up to date.
[2/6] No configure step for 'googletest'
[3/6] No build step for 'googletest'
[4/6] No install step for 'googletest'
[5/6] No test step for 'googletest'
[6/6] Completed 'googletest'
-- Clipper version 6.4.2.
-- NLopt version 2.5.0
-- Poly2tri version 1.0.0.
CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
libcds/CMakeLists.txt:30 (find_package)
CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
libcds/CMakeLists.txt:30 (find_package)
CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
libcds/CMakeLists.txt:30 (find_package)
CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
libcds/CMakeLists.txt:30 (find_package)
CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
libcds/CMakeLists.txt:30 (find_package)
-- Could NOT find Boost
-- Binary output path: D:/simulation_toolkit/cmake.build.release/libcds/bin
C++ std: -std=c++11 (default)
Build type -- release
Compiler version: GNU 4.8.2
System: Windows version: 10.0.16299
Target architecture: x86_64
Compiler flags: -O3 -DNDEBUG -std=c++11;-mcx16 -Wall;-Wextra;-pedantic;-Wno-unused-local-typedefs
Exe flags:
Boost: Using CMake-fied boost
...
and then it goes downhill from there with compile errors due to missing boost. Dunno why it picks gcc over msvc toolchain.
from rpmalloc.
Let me try to replicate what you've done. What was the command you issued to build boost?
Was it?
b2 toolset=<toolset> address-model=64 link=static,shared threading=multi --layout=versioned --with-system --with-thread --with-fiber --with-context install
from rpmalloc.
The problem is the version of cmake doesn't know how to find the version of boost you've got. It's probably a new boost? 1.66 or greater?
https://gitlab.kitware.com/cmake/cmake/issues/17575
from rpmalloc.
Ah, yes, I was using 1.66. Will try again with 1.65.1 like in your readme
from rpmalloc.
Right, with boost 1.65.1 and the latest develop rpmalloc it seems to pass:
Start 91: rpmalloc_tests
91/91 Test #91: rpmalloc_tests ............................ Passed 0.85 sec
100% tests passed, 0 tests failed out of 91
from rpmalloc.
That does indeed seem to have sorted the issue. Cheers ;)
from rpmalloc.
Related Issues (20)
- Segfault deallocating assign()ed std::string on macOS when built with -O2 or -O3 HOT 12
- Cross thread allocation/deallocation bug causing crashes HOT 5
- -Wstatic-in-inline in malloc.c HOT 2
- Some usage annoyances while compiling & using rpmalloc on Sony's consoles HOT 1
- Question about case in _rpmalloc_span_double_link_list_remove HOT 3
- Add packages to vcpkg? HOT 1
- build failed with msvs 2022 HOT 4
- Compilation fails on latest Alpine Linux HOT 1
- Potential bug: get_thread_id / rpmalloc_heap_thread_set_current HOT 10
- Warnings: "... specifies less restrictive attributes than its target" HOT 4
- Segmentation fault when building with ENABLE_OVERRIDE=1 and linking it statically HOT 15
- Segmentation fault when revising parameters(span_size and span_map_count) HOT 1
- undefined `false` when compiling HOT 1
- Linking error: unresolved external symbol _rpmalloc_module_init HOT 5
- `SIGABRT` when building w/ `-DENABLE_ASSERTS=1 -DENABLE_OVERRIDE=1 -DENABLE_PRELOAD=1` HOT 1
- Memory usage seems large compared with alternatives and is unaffected by cache settings. HOT 7
- rpmalloc_heap_free - thread safe? HOT 1
- Segmentation fault with the rewrite branch in certain benchmarks HOT 5
- enable_unlimited_thread_cache HOT 1
- Build fails using clang-16 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rpmalloc.