Skip to content
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

A trait generalizing MPool #35

Open
efenniht opened this issue Aug 20, 2019 · 1 comment
Open

A trait generalizing MPool #35

efenniht opened this issue Aug 20, 2019 · 1 comment
Assignees

Comments

@efenniht
Copy link
Collaborator

MPool은 현재 pool: SpinLock<Pool>fallback: *const MPool 로 이루어져 있습니다. 이때 fallback이 존재하는 지에 따라서 allocation의 동작이 달라지는데요. 이 타입을 좀 더 일반화하여 메모리 풀을 나타내는 trait을 만들도록 합니다. 이렇게 하면,

  • 어떻게 fallback 의 체인이 엮여 있는 지 정적으로 알 수 있습니다.
  • 따라서 fallback이 null인지 체크할 필요가 없고 (코드가 단순해짐)
  • raw pointer 대신 레퍼런스를 사용해도 됩니다... (이건 굳이 trait을 만들지 않아도 가능할 것 같기도?)
@jeehoonkang
Copy link
Member

좀 해보니.. test를 먼저 없애는게 도움이 될 것 같습니다: https://github.com/jeehoonkang/hafnium-verification/tree/hfo2-mpool

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

No branches or pull requests

2 participants