-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optimize memory layout #39
base: dev
Are you sure you want to change the base?
optimize memory layout #39
Conversation
f44d778
to
e9a6c17
Compare
Rebased this branch and with the latest patches for ChunkedList, the memory-leaks previously observed on this branch are gone now. |
c93e2f5
to
9aec140
Compare
After this PR is in the mainline I will add a clang format file and auto-format the code. |
Rebased again, and I'm not able to break it so far, all tests look fine. Only concern I have now is the use of
Ideally we would need offsetof for base-classes.
|
This PR produces many address sanitizer issues.
|
If we inherit from |
… `item_data_ptr`
…ntinuableTask object by empace_continuable_task() if its really needed
…where TaskSpace & ItemControlBlock are complete types
9aec140
to
c185107
Compare
c185107
to
cb37cf7
Compare
This PR implements some memory-layout optimizations which in turn will hopefully improve cache utilization.
The majority of bytes saved come from a custom implementation of reference-counting, where a smart-pointer reference only allocates a single pointer (8byte) instead of the fat 16-byte
std::shared_ptr
.Additionally the members of some structs have been reordered to reduce space wasted by alignment.
Another place where some bytes are gained is to implement
null
-types directly instead of usingstd::optional
(e.g. forEventPtr
).Minimal Task-Config (only Resource-, Graph- & IdProperty)
Task
TaskProperties
Extended Task-Config (+ LabelProperty, SchedulingTag)
Task
TaskProperties
IDProperty
ResourceProperty
GraphProperty
Event
EventPtr
ChunkedList<uint8_t>
ChunkedList<uint8_t>::Item
AtomicList<uint8_t>
AtomicList<uint8_t>::ItemLink