Skip to content

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

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_940585131
Jun 30, 2026
Merged

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

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: 940671342
@copybara-service copybara-service Bot merged commit 5093ac4 into main Jun 30, 2026
@copybara-service copybara-service Bot deleted the test_940585131 branch June 30, 2026 21:50
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