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

Copy link
Copy Markdown
Member

No description provided.

@andygroveandygrove 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 threadrust/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
MemberAuthor

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

Copy link
Copy Markdown
MemberAuthor

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

@nevi-me

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

Copy link
Copy Markdown
MemberAuthor

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-menevi-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

Copy link
Copy Markdown
MemberAuthor

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 freeto 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

@sunchao@nevi-me@andygrove