Skip to content

Switch CPUAllocator via TypedAllocator to aligned operator new and delete#3593

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_940746338
Jul 2, 2026
Merged

Switch CPUAllocator via TypedAllocator to aligned operator new and delete#3593
copybara-service[bot] merged 1 commit into
mainfrom
test_940746338

Conversation

@copybara-service

Copy link
Copy Markdown

Switch CPUAllocator via TypedAllocator to aligned operator new and delete

  • Add AlignedNew and AlignedDelete to tsl::port and implement them across Linux, default, and Windows ports using C++17 aligned operator new/delete.
  • Add AllocateRawAlignedNew and DeallocateRawAlignedNew virtual overloads to Allocator and override them in CPUAllocator.
  • Update TypedAllocator to call AllocateRawAlignedNew and DeallocateRawAlignedNew.

…lete

* Add AlignedNew and AlignedDelete to tsl::port and implement them across Linux, default, and Windows ports using C++17 aligned operator new/delete.
* Add AllocateRawAlignedNew and DeallocateRawAlignedNew virtual overloads to Allocator and override them in CPUAllocator.
* Update TypedAllocator to call AllocateRawAlignedNew and DeallocateRawAlignedNew.

PiperOrigin-RevId: 941396529
@copybara-service copybara-service Bot merged commit 3c76eb1 into main Jul 2, 2026
@copybara-service copybara-service Bot deleted the test_940746338 branch July 2, 2026 01:35
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.

1 participant