Comments (9)
Hmmm, interesting, but it is hard to know if this is our problem with the few details you provided. A full stack trace would be nice. Also, to work around the problem, you could try using an alternative memory_policy
.
from immer.
Yeah, I understand..I have the case in the Xcode debugger right now; I don't know if I can save the stack trace, but here's the call stack in words π¬:
- We're on the
com.apple.main-thread
in_dyld_start
- It calls
ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&)
- It calls
__cxx_global_var_init.833()
. This initializes thetemplate <typename T, typename MP, bits_t B, bits_t BL> const rrbtree<T, MP, B, BL> rrbtree<T, MP, B, BL>::empty
(inimmer/detail/rbts/rbbtree.hpp
:1274). - The initializer calls
node_t::make_inner_n(0u)
. - In
node.hpp:216
, it executes the statementauto m = heap::allocate(sizeof_inner_n(n));
. - This calls into
immer/heap/with_data.hpp:42
, where it executes:auto p = base_t::allocate(size + sizeof(T), tags...);
. - This calls into
immer/heap/unsafe_free_list_heap.hpp:64
, where it executes:auto n = storage::head.data;
. - Then we're in the thread-local wrapper routine at the point in the screenshot above.
With IMMER_NO_FREE_LIST
set to 1
, the crash doesn't occur.
from immer.
from immer.
Thanks, I'll use the workaround for now. Because it's about the allocation, it only affects the mutation performance, and not the iteration performance, right?
from immer.
@martinfinke that is correct, access performance should not be affected. Updates might become slower, depending on the particular data patterns you use. I wouldn't worry too much about it. (Btw, IMMER_NO_FREE_LIST
to 1
has the same effect as passing that policy explicitly, but in that case that is affecting all immer
instances.)
from immer.
Great, then performance is fine for now π (I'll leave this open, you can keep it if you want to fix something about this)
from immer.
Addressed by #42. @martinfinke can you check that this solves your problem once this lands master?
from immer.
Just tested it with optimisations, I can confirm that this has solved the problem. Thanks so much! π
from immer.
from immer.
Related Issues (20)
- Add maps with keys extracted from the value HOT 9
- Boehm GC optional dependency warnings at configure time HOT 4
- gcc12 support request / array bound warning HOT 5
- call of overloaded βdestroy_n(std::__cxx11::basic_string<char>*, immer::detail::rbts::count_t&)β is ambiguous HOT 1
- GCC 12 gives lots of verbose warnings HOT 3
- Eigen Types + variant + holds_alternative<> + immer::flex_vector segfault in opt builds. HOT 1
- vector::iterator + X expects X to be int, not size_type HOT 3
- flex_vector does not respect type alignment requirements HOT 7
- Create a new release of this library HOT 3
- immer::map can no longer be used with std::views/std::ranges HOT 2
- Memory leak in debug builds HOT 7
- Implementation into a hosted language HOT 5
- `noexcept` move constructors for `flex_vector` and other data-structures HOT 9
- Logo is hidden when using GitHub dark theme HOT 1
- IMMER_RETHROW causes -Wreturn-type warnings in IMMER_NO_EXCEPTIONS builds HOT 2
- NDEBUG flag breaks binary compatibility, which can cause mysterious crashes HOT 5
- New release HOT 1
- CLANG-16 UBSan Error constructor call with insufficient space for an object of type 'node_t' HOT 8
- Build instructions need updating HOT 1
- Compiling in C++23 mode issues a deprecation warning for `std::aligned_storage`. HOT 2
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 immer.