Skip to content

Use posix_memalign/free in AlignedAllocator for ANDROID_API<28.#38735

Merged
RyanTheOptimist merged 2 commits intoenvoyproxy:mainfrom
wu-bin:align2
Mar 13, 2025
Merged

Use posix_memalign/free in AlignedAllocator for ANDROID_API<28.#38735
RyanTheOptimist merged 2 commits intoenvoyproxy:mainfrom
wu-bin:align2

Conversation

@wu-bin
Copy link
Copy Markdown
Contributor

@wu-bin wu-bin commented Mar 13, 2025

std::aligned_alloc is not available for ANDROID_API<28, this change switch it to posix_memalign/free instead.

Commit Message: Use posix_memalign/free in AlignedAllocator for ANDROID_API<28.
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

@wu-bin
Copy link
Copy Markdown
Contributor Author

wu-bin commented Mar 13, 2025

/assign @abeyad

@wu-bin
Copy link
Copy Markdown
Contributor Author

wu-bin commented Mar 13, 2025

/retest

Copy link
Copy Markdown
Contributor

@abeyad abeyad left a comment

Choose a reason for hiding this comment

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

thanks @wu-bin !

#pragma once

#ifdef __ANDROID_API__
#if __ANDROID_API__ < 28
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.

nit: I think we can combine these conditions to:

if defined(__ANDROID_API__) && __ANDROID_API__ < 28

Signed-off-by: Bin Wu <wub@google.com>
Copy link
Copy Markdown
Contributor

@abeyad abeyad left a comment

Choose a reason for hiding this comment

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

thanks so much for the prompt fix @wu-bin !

@wu-bin
Copy link
Copy Markdown
Contributor Author

wu-bin commented Mar 13, 2025

/retest

@RyanTheOptimist RyanTheOptimist merged commit 0aaaa32 into envoyproxy:main Mar 13, 2025
25 checks passed
jewertow pushed a commit to jewertow/envoy that referenced this pull request Apr 2, 2025
…yproxy#38735)

std::aligned_alloc is not available for ANDROID_API<28, this change
switch it to posix_memalign/free instead.


Commit Message: Use posix_memalign/free in AlignedAllocator for
ANDROID_API<28.
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional [API
Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: Bin Wu <wub@google.com>
agrawroh pushed a commit to agrawroh/envoy that referenced this pull request Apr 9, 2025
…yproxy#38735)

std::aligned_alloc is not available for ANDROID_API<28, this change
switch it to posix_memalign/free instead.


Commit Message: Use posix_memalign/free in AlignedAllocator for
ANDROID_API<28.
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional [API
Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: Bin Wu <wub@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants