Skip to content

Commit 5728f2b

Browse files
committed
Update base for Update on "[Executorch] Use temp allocator for allocating scratch memory"
This allows us to leverage temp memory allocator and if that allocator is caching allocator it reduces the allocaiton overhead. Differential Revision: [D85532076](https://our.internmc.facebook.com/intern/diff/D85532076/) [ghstack-poisoned]
1 parent 6cec56e commit 5728f2b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

extension/memory_allocator/test/cpu_caching_malloc_allocator_test.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,8 @@ TEST_F(CPUCachingAllocatorTest, ResetFreesEverythingWhenOverMaxSize) {
330330
EXPECT_NE(p5, nullptr);
331331

332332
// These should be new allocations, not cached ones
333-
EXPECT_NE(p4, p1);
334-
EXPECT_NE(p4, p2);
335-
EXPECT_NE(p4, p3);
336-
EXPECT_NE(p5, p1);
337-
EXPECT_NE(p5, p2);
338-
EXPECT_NE(p5, p3);
333+
// However, system allocator might cache and return the same pointesr
334+
// so we can't check for strict equality or inequality
339335
}
340336

341337
TEST_F(CPUCachingAllocatorTest, ResetCachesWhenUnderMaxSize) {

0 commit comments

Comments
 (0)