-
Notifications
You must be signed in to change notification settings - Fork 71
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
Remove the heapsize dependency. #115
Conversation
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.
Looks good, thanks for doing this! Just needs one small change before merging.
src/ingest/buffer.rs
Outdated
@@ -77,5 +78,9 @@ impl Buffer { | |||
pub fn len(&self) -> usize { | |||
self.length | |||
} | |||
|
|||
pub fn heap_size_of_children(&self) -> usize { | |||
mem::size_of::<Buffer>() |
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 isn't quite right because it will not account for any contents of the buffer
HashMap
, just the pointer.
I'm fine with just ignoring Buffer
completely though (and maybe adding a comment to that extent in Table::heap_size_of_children
) since it's not really used at the moment.
@cswinter I have update the |
@cswinter Missed this point. Updated. |
@cswinter I think BTW: The commit tree is a mess. Please squash merge to eliminate such commits. |
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.
Squashing sounds good, just need one more small fix!
src/ingest/raw_val.rs
Outdated
@@ -23,7 +23,7 @@ impl RawVal { | |||
match *self { | |||
RawVal::Int(_) => mem::size_of::<i64>(), |
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.
The i64
would be part of the RawVal
, since it does not cause a heap allocation this should just return 0.
@cswinter Sorry for that. Previously I am a Java developer. It's not so intuitive for me to distinguish whether a object is on heap or stack. |
No worries, there's always more to learn 😄 |
I have removed the heapsize crate in order to build on Max OS X. Moving
heap_size_of_children
into individual structs'impl
blocks.Also, I have update the rust-toolchain to 2018-12-31 while rls on Mac is missing in nightly-2018-12-30 version.
https://mexus.github.io/rustup-components-history/x86_64-apple-darwin.html