Skip to content

ARROW-5284: [Rust] Replace libc with std::alloc for memory allocation#4273

Closed
sunchao wants to merge 6 commits into
apache:masterfrom
sunchao:ARROW-5284
Closed

ARROW-5284: [Rust] Replace libc with std::alloc for memory allocation#4273
sunchao wants to merge 6 commits into
apache:masterfrom
sunchao:ARROW-5284

Conversation

@sunchao

@sunchao sunchao commented May 8, 2019

Copy link
Copy Markdown
Member

No description provided.

@andygrove andygrove left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one question.

Comment thread rust/arrow/src/memory.rs Outdated
@@ -18,80 +18,35 @@
//! Defines memory-related functions, currently mostly to make this library play nicely
//! with C.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this comment still relevant?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem related anymore. Will delete later.

@sunchao

sunchao commented May 10, 2019

Copy link
Copy Markdown
Member Author

Please do not commit this yet - I still need to investigate the windows test failure.

@nevi-me

nevi-me commented May 11, 2019

Copy link
Copy Markdown
Contributor

Hey @sunchao, I'm able to reproduce the failure, it comes from buffer::tests::test_from_raw_parts. specifically: Buffer::from_raw_parts(null_mut(), 0); causes the failure.

I ran cargo test with 1 thread to find the offender.

@sunchao

sunchao commented May 14, 2019

Copy link
Copy Markdown
Member Author

Thanks @nevi-me . I think it fails because it was trying to dealloc a null pointer. Not sure why it doesn't fail on linux.

@nevi-me nevi-me left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Would this fix the 64-byte counting issue that I was experiencing on #4167 ?

@sunchao

sunchao commented May 14, 2019

Copy link
Copy Markdown
Member Author

LGTM! Would this fix the 64-byte counting issue that I was experiencing on #4167 ?

No. I'm going to work on that next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants