@@ -244,12 +244,12 @@ TestResult ConcurrencyTest::testMemoryAllocationRace() {
244244 std::vector<std::thread> threads;
245245 std::atomic<int > success_count{0 };
246246 std::atomic<int > failure_count{0 };
247- std::vector<Memory > all_allocations;
247+ std::vector<MemoryBlock > all_allocations;
248248 std::mutex allocations_mutex;
249249
250250 for (int i = 0 ; i < num_threads; ++i) {
251251 threads.emplace_back ([&, i]() {
252- std::vector<Memory > thread_allocations;
252+ std::vector<MemoryBlock > thread_allocations;
253253 try {
254254 for (int j = 0 ; j < allocations_per_thread; ++j) {
255255 size_t size = 64 + (j % 1024 );
@@ -373,7 +373,7 @@ TestResult ExceptionSafetyTest::testDeallocationException() {
373373 return measureTime (" DeallocationException" , [this ]() -> bool {
374374 try {
375375 // Test that deallocation doesn't throw exceptions
376- std::vector<std::shared_ptr<Memory >> memories;
376+ std::vector<std::shared_ptr<MemoryBlock >> memories;
377377
378378 // Allocate some memory
379379 for (int i = 0 ; i < 10 ; ++i) {
@@ -468,7 +468,7 @@ TestResult MemoryLeakTest::testBasicLeakDetection() {
468468 MemoryLeakDetector::instance ().reset ();
469469
470470 // Allocate and deallocate memory
471- std::vector<std::shared_ptr<Memory >> memories;
471+ std::vector<std::shared_ptr<MemoryBlock >> memories;
472472 for (int i = 0 ; i < 100 ; ++i) {
473473 auto memory = context::allocateMemory (1024 );
474474 if (memory) {
@@ -549,7 +549,7 @@ TestResult MemoryLeakTest::testExceptionLeakDetection() {
549549 return measureTime (" ExceptionLeakDetection" , [this ]() -> bool {
550550 try {
551551 // Test that exceptions don't cause memory leaks
552- std::vector<std::shared_ptr<Memory >> memories;
552+ std::vector<std::shared_ptr<MemoryBlock >> memories;
553553
554554 try {
555555 // Allocate some memory
@@ -624,7 +624,7 @@ TestResult PerformanceTest::testAllocationPerformance() {
624624
625625 auto start = std::chrono::high_resolution_clock::now ();
626626
627- std::vector<std::shared_ptr<Memory >> memories;
627+ std::vector<std::shared_ptr<MemoryBlock >> memories;
628628 for (int i = 0 ; i < num_allocations; ++i) {
629629 auto memory = context::allocateMemory (allocation_size);
630630 if (memory) {
@@ -784,7 +784,7 @@ TestResult StressTest::testHighFrequencyAllocations() {
784784 return measureTime (" HighFrequencyAllocations" , [this ]() -> bool {
785785 try {
786786 const int num_allocations = iterations_;
787- std::vector<std::shared_ptr<Memory >> memories;
787+ std::vector<std::shared_ptr<MemoryBlock >> memories;
788788 memories.reserve (num_allocations);
789789
790790 auto start = std::chrono::high_resolution_clock::now ();
@@ -825,7 +825,7 @@ TestResult StressTest::testLargeMemoryAllocations() {
825825 const size_t large_size = 100 * 1024 * 1024 ; // 100MB
826826 const int num_allocations = 10 ;
827827
828- std::vector<std::shared_ptr<Memory >> memories;
828+ std::vector<std::shared_ptr<MemoryBlock >> memories;
829829
830830 for (int i = 0 ; i < num_allocations; ++i) {
831831 try {
@@ -871,7 +871,7 @@ TestResult StressTest::testCrossDeviceStress() {
871871 }
872872
873873 const int num_operations = 1000 ;
874- std::vector<std::shared_ptr<Memory >> pinned_memories;
874+ std::vector<std::shared_ptr<MemoryBlock >> pinned_memories;
875875
876876 for (int i = 0 ; i < num_operations; ++i) {
877877 // Switch to random device
0 commit comments