-
Notifications
You must be signed in to change notification settings - Fork 615
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
Update memory resource interfaces. #2742
Conversation
Signed-off-by: Michał Zientkiewicz <[email protected]>
Signed-off-by: Michał Zientkiewicz <[email protected]>
!build |
CI MESSAGE: [2119321]: BUILD STARTED |
@@ -163,6 +163,10 @@ class test_resource_wrapper<owning, security_check, memory_resource<kind, order> | |||
return this->upstream_->deallocate(p, b, a); | |||
}, ptr, bytes, alignment); | |||
} | |||
|
|||
virtual Context do_get_context() const noexcept { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cannot be marked override
because the base class for any_context
does not contain a virtual function of this name (for any context this function is never used, but it's here regardless to avoid excessive complexity).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every time I see a comment in review that justifies how the code is written I think it should probably be put into the code itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot agree more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explains - yes.
Justifies - not really.
That would be just noise and it's likely to go stale should this function make its way back to the interface (which I'm arguing for).
@@ -163,11 +163,15 @@ class monotonic_memory_resource<kind, order, true> : public memory_resource<kind | |||
void do_deallocate(void *data, size_t bytes, size_t alignment) override { | |||
} | |||
|
|||
virtual Context do_get_context() const noexcept { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot mark override due to variable interface - see previous comment.
@@ -254,9 +258,13 @@ class monotonic_memory_resource<kind, order, false> : public memory_resource<kin | |||
void do_deallocate(void *data, size_t bytes, size_t alignment) override { | |||
} | |||
|
|||
virtual Context do_get_context() const noexcept { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot mark override due to variable interface - see previous comment.
@@ -127,14 +127,18 @@ class pool_resource_base : public memory_resource<kind, order> { | |||
} | |||
} | |||
|
|||
virtual Context do_get_context() const noexcept { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot mark override due to variable interface - see previous comment.
CI MESSAGE: [2119342]: BUILD STARTED |
CI MESSAGE: [2119402]: BUILD STARTED |
CI MESSAGE: [2119402]: BUILD PASSED |
CI MESSAGE: [2119342]: BUILD PASSED |
Signed-off-by: Michał Zientkiewicz [email protected]
Why we need this PR?
Pick one, remove the rest
What happened in this PR?
Fill relevant points, put NA otherwise. Replace anything inside []
JIRA TASK: N/A