{"action":"created","comment":{"url":"https://api.github.com/repos/apache/arrow/pulls/comments/62957443","id":62957443,"diff_hunk":"@@ -44,14 +45,22 @@ class InternalMemoryPool : public MemoryPool {\n };\n \n Status InternalMemoryPool::Allocate(int64_t size, uint8_t** out) {\n+  constexpr size_t kAlignment = 64;\n   std::lock_guard<std::mutex> guard(pool_lock_);\n-  *out = static_cast<uint8_t*>(std::malloc(size));\n-  if (*out == nullptr) {\n+  // TODO(emkornfield) find something compatible with windows","path":"cpp/src/arrow/util/memory-pool.cc","position":16,"original_position":16,"commit_id":"6ff3048dc63a35b660c9e5043077a0174987b2a6","original_commit_id":"6ff3048dc63a35b660c9e5043077a0174987b2a6","user":{"login":"wesm","id":329591,"avatar_url":"https://avatars.githubusercontent.com/u/329591?v=3","gravatar_id":"","url":"https://api.github.com/users/wesm","html_url":"https://github.com/wesm","followers_url":"https://api.github.com/users/wesm/followers","following_url":"https://api.github.com/users/wesm/following{/other_user}","gists_url":"https://api.github.com/users/wesm/gists{/gist_id}","starred_url":"https://api.github.com/users/wesm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesm/subscriptions","organizations_url":"https://api.github.com/users/wesm/orgs","repos_url":"https://api.github.com/users/wesm/repos","events_url":"https://api.github.com/users/wesm/events{/privacy}","received_events_url":"https://api.github.com/users/wesm/received_events","type":"User","site_admin":false},"body":"Looks like `_aligned_malloc` is the thing on windows https://msdn.microsoft.com/en-us/library/8z34s9c6.aspx. since these have different APIs (the windows API sets errno on failure) we should probably factor the aligned allocation out into a utility function that returns `Status`. ","created_at":"2016-05-12T02:33:47Z","updated_at":"2016-05-12T02:33:47Z","html_url":"https://github.com/apache/arrow/pull/74#discussion_r62957443","pull_request_url":"https://api.github.com/repos/apache/arrow/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/apache/arrow/pulls/comments/62957443"},"html":{"href":"https://github.com/apache/arrow/pull/74#discussion_r62957443"},"pull_request":{"href":"https://api.github.com/repos/apache/arrow/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/apache/arrow/pulls/74","id":69642221,"html_url":"https://github.com/apache/arrow/pull/74","diff_url":"https://github.com/apache/arrow/pull/74.diff","patch_url":"https://github.com/apache/arrow/pull/74.patch","issue_url":"https://api.github.com/repos/apache/arrow/issues/74","number":74,"state":"open","locked":false,"title":"ARROW-185: Make padding and alignment for all buffers be 64 bytes","user":{"login":"emkornfield","id":17869838,"avatar_url":"https://avatars.githubusercontent.com/u/17869838?v=3","gravatar_id":"","url":"https://api.github.com/users/emkornfield","html_url":"https://github.com/emkornfield","followers_url":"https://api.github.com/users/emkornfield/followers","following_url":"https://api.github.com/users/emkornfield/following{/other_user}","gists_url":"https://api.github.com/users/emkornfield/gists{/gist_id}","starred_url":"https://api.github.com/users/emkornfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emkornfield/subscriptions","organizations_url":"https://api.github.com/users/emkornfield/orgs","repos_url":"https://api.github.com/users/emkornfield/repos","events_url":"https://api.github.com/users/emkornfield/events{/privacy}","received_events_url":"https://api.github.com/users/emkornfield/received_events","type":"User","site_admin":false},"body":"+ some small cleanup/removal of unnecessary code.  I think there is likely a good opportunity to factor this code better generally, but this seems to work for now.","created_at":"2016-05-11T09:39:43Z","updated_at":"2016-05-12T02:33:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b322636260e5fe347d50318ecc29310eddd3f63","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/arrow/pulls/74/commits","review_comments_url":"https://api.github.com/repos/apache/arrow/pulls/74/comments","review_comment_url":"https://api.github.com/repos/apache/arrow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/arrow/issues/74/comments","statuses_url":"https://api.github.com/repos/apache/arrow/statuses/6ff3048dc63a35b660c9e5043077a0174987b2a6","head":{"label":"emkornfield:emk_fix_allocations_PR","ref":"emk_fix_allocations_PR","sha":"6ff3048dc63a35b660c9e5043077a0174987b2a6","user":{"login":"emkornfield","id":17869838,"avatar_url":"https://avatars.githubusercontent.com/u/17869838?v=3","gravatar_id":"","url":"https://api.github.com/users/emkornfield","html_url":"https://github.com/emkornfield","followers_url":"https://api.github.com/users/emkornfield/followers","following_url":"https://api.github.com/users/emkornfield/following{/other_user}","gists_url":"https://api.github.com/users/emkornfield/gists{/gist_id}","starred_url":"https://api.github.com/users/emkornfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emkornfield/subscriptions","organizations_url":"https://api.github.com/users/emkornfield/orgs","repos_url":"https://api.github.com/users/emkornfield/repos","events_url":"https://api.github.com/users/emkornfield/events{/privacy}","received_events_url":"https://api.github.com/users/emkornfield/received_events","type":"User","site_admin":false},"repo":{"id":54009687,"name":"arrow","full_name":"emkornfield/arrow","owner":{"login":"emkornfield","id":17869838,"avatar_url":"https://avatars.githubusercontent.com/u/17869838?v=3","gravatar_id":"","url":"https://api.github.com/users/emkornfield","html_url":"https://github.com/emkornfield","followers_url":"https://api.github.com/users/emkornfield/followers","following_url":"https://api.github.com/users/emkornfield/following{/other_user}","gists_url":"https://api.github.com/users/emkornfield/gists{/gist_id}","starred_url":"https://api.github.com/users/emkornfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emkornfield/subscriptions","organizations_url":"https://api.github.com/users/emkornfield/orgs","repos_url":"https://api.github.com/users/emkornfield/repos","events_url":"https://api.github.com/users/emkornfield/events{/privacy}","received_events_url":"https://api.github.com/users/emkornfield/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/emkornfield/arrow","description":"Mirror of Apache Arrow","fork":true,"url":"https://api.github.com/repos/emkornfield/arrow","forks_url":"https://api.github.com/repos/emkornfield/arrow/forks","keys_url":"https://api.github.com/repos/emkornfield/arrow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emkornfield/arrow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emkornfield/arrow/teams","hooks_url":"https://api.github.com/repos/emkornfield/arrow/hooks","issue_events_url":"https://api.github.com/repos/emkornfield/arrow/issues/events{/number}","events_url":"https://api.github.com/repos/emkornfield/arrow/events","assignees_url":"https://api.github.com/repos/emkornfield/arrow/assignees{/user}","branches_url":"https://api.github.com/repos/emkornfield/arrow/branches{/branch}","tags_url":"https://api.github.com/repos/emkornfield/arrow/tags","blobs_url":"https://api.github.com/repos/emkornfield/arrow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emkornfield/arrow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emkornfield/arrow/git/refs{/sha}","trees_url":"https://api.github.com/repos/emkornfield/arrow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emkornfield/arrow/statuses/{sha}","languages_url":"https://api.github.com/repos/emkornfield/arrow/languages","stargazers_url":"https://api.github.com/repos/emkornfield/arrow/stargazers","contributors_url":"https://api.github.com/repos/emkornfield/arrow/contributors","subscribers_url":"https://api.github.com/repos/emkornfield/arrow/subscribers","subscription_url":"https://api.github.com/repos/emkornfield/arrow/subscription","commits_url":"https://api.github.com/repos/emkornfield/arrow/commits{/sha}","git_commits_url":"https://api.github.com/repos/emkornfield/arrow/git/commits{/sha}","comments_url":"https://api.github.com/repos/emkornfield/arrow/comments{/number}","issue_comment_url":"https://api.github.com/repos/emkornfield/arrow/issues/comments{/number}","contents_url":"https://api.github.com/repos/emkornfield/arrow/contents/{+path}","compare_url":"https://api.github.com/repos/emkornfield/arrow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emkornfield/arrow/merges","archive_url":"https://api.github.com/repos/emkornfield/arrow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emkornfield/arrow/downloads","issues_url":"https://api.github.com/repos/emkornfield/arrow/issues{/number}","pulls_url":"https://api.github.com/repos/emkornfield/arrow/pulls{/number}","milestones_url":"https://api.github.com/repos/emkornfield/arrow/milestones{/number}","notifications_url":"https://api.github.com/repos/emkornfield/arrow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emkornfield/arrow/labels{/name}","releases_url":"https://api.github.com/repos/emkornfield/arrow/releases{/id}","deployments_url":"https://api.github.com/repos/emkornfield/arrow/deployments","created_at":"2016-03-16T07:22:02Z","updated_at":"2016-03-16T07:22:05Z","pushed_at":"2016-05-11T09:38:00Z","git_url":"git://github.com/emkornfield/arrow.git","ssh_url":"git@github.com:emkornfield/arrow.git","clone_url":"https://github.com/emkornfield/arrow.git","svn_url":"https://github.com/emkornfield/arrow","homepage":null,"size":1038,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"4bd13b852d376065fdb16c36fa821ab0e167f0fc","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":51905353,"name":"arrow","full_name":"apache/arrow","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/arrow","description":"Mirror of Apache Arrow","fork":false,"url":"https://api.github.com/repos/apache/arrow","forks_url":"https://api.github.com/repos/apache/arrow/forks","keys_url":"https://api.github.com/repos/apache/arrow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/arrow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/arrow/teams","hooks_url":"https://api.github.com/repos/apache/arrow/hooks","issue_events_url":"https://api.github.com/repos/apache/arrow/issues/events{/number}","events_url":"https://api.github.com/repos/apache/arrow/events","assignees_url":"https://api.github.com/repos/apache/arrow/assignees{/user}","branches_url":"https://api.github.com/repos/apache/arrow/branches{/branch}","tags_url":"https://api.github.com/repos/apache/arrow/tags","blobs_url":"https://api.github.com/repos/apache/arrow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/arrow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/arrow/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/arrow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/arrow/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/arrow/languages","stargazers_url":"https://api.github.com/repos/apache/arrow/stargazers","contributors_url":"https://api.github.com/repos/apache/arrow/contributors","subscribers_url":"https://api.github.com/repos/apache/arrow/subscribers","subscription_url":"https://api.github.com/repos/apache/arrow/subscription","commits_url":"https://api.github.com/repos/apache/arrow/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/arrow/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/arrow/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/arrow/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/arrow/contents/{+path}","compare_url":"https://api.github.com/repos/apache/arrow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/arrow/merges","archive_url":"https://api.github.com/repos/apache/arrow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/arrow/downloads","issues_url":"https://api.github.com/repos/apache/arrow/issues{/number}","pulls_url":"https://api.github.com/repos/apache/arrow/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/arrow/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/arrow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/arrow/labels{/name}","releases_url":"https://api.github.com/repos/apache/arrow/releases{/id}","deployments_url":"https://api.github.com/repos/apache/arrow/deployments","created_at":"2016-02-17T08:00:23Z","updated_at":"2016-05-11T08:00:42Z","pushed_at":"2016-05-12T02:24:12Z","git_url":"git://github.com/apache/arrow.git","ssh_url":"git@github.com:apache/arrow.git","clone_url":"https://github.com/apache/arrow.git","svn_url":"https://github.com/apache/arrow","homepage":null,"size":1310,"stargazers_count":542,"watchers_count":542,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":106,"mirror_url":"git://git.apache.org/arrow.git","open_issues_count":11,"forks":106,"open_issues":11,"watchers":542,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/arrow/pulls/74"},"html":{"href":"https://github.com/apache/arrow/pull/74"},"issue":{"href":"https://api.github.com/repos/apache/arrow/issues/74"},"comments":{"href":"https://api.github.com/repos/apache/arrow/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/arrow/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/arrow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/arrow/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/apache/arrow/statuses/6ff3048dc63a35b660c9e5043077a0174987b2a6"}}}}