Skip to content

Rebuild: memory_policy, now we have stable and elastic options.#1

Open
dakingffo wants to merge 4 commits intomasterfrom
refactor/policy-pattern
Open

Rebuild: memory_policy, now we have stable and elastic options.#1
dakingffo wants to merge 4 commits intomasterfrom
refactor/policy-pattern

Conversation

@dakingffo
Copy link
Owner

MPSC_queue<int, stable<256, 64, 2>> queue;

This is a queue that does not free memory during runtime(when number of MPSC_queue instance > 0).
This pattern use old architecture, but we also rebuild global_manager.
thread local capacity: 256
alignment: 64
memory expasion factor: 2

MPSC_queue<int, elastic<256, 64, 2>> queue;

This is a queue that will free memory during runtime.
This pattern use new architecture. we are designing it.
thread local capacity: 256
alignment: 64
load factor: 2 (The maximum ratio of the number of producers to the number of chunks that triggers the release process)

@dakingffo dakingffo self-assigned this Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant