ComputationalRadiationPhysics / redGrapes

Resource-based, Declarative task-Graphs for Parallel, Event-driven Scheduling :grapes:
https://redgrapes.rtfd.io
Mozilla Public License 2.0
20 stars 5 forks source link

ChunkedList: store pointers to next/last elements instead of indices … #48

Closed michaelsippel closed 10 months ago

michaelsippel commented 10 months ago

…to save overhead of address calculation and allow more efficient packing of ItemAccess

michaelsippel commented 10 months ago

Here I'm still getting warnings which I dont understand

warning: 'short unsigned int __atomic_fetch_sub_2(volatile void*, short unsigned int, int)' writing 2 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
  645 |       { return __atomic_fetch_sub(&_M_i, __i, int(__m)); }
psychocoderHPC commented 10 months ago

Here I'm still getting warnings which I dont understand

warning: 'short unsigned int __atomic_fetch_sub_2(volatile void*, short unsigned int, int)' writing 2 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
  645 |       { return __atomic_fetch_sub(&_M_i, __i, int(__m)); }

Could it be a hint that some data are unaligned?

psychocoderHPC commented 10 months ago

@michaelsippel Is this PR a replacement for #45?

michaelsippel commented 10 months ago

Yes you are right, this PR does not include the fix for the double allocation / memory leak yet , #45 is still neccesary, either one needs to be rebased

psychocoderHPC commented 10 months ago

I opened a PR against your PR to solve the double free and alloc issue: https://github.com/michaelsippel/redGrapes/pull/1 My local tests works well, please have a look. As I wrote before it is not necessary that #45 get merged if this PR is solving the big issue with the double alloc and free.