Lines Matching refs:fs

95   FakeStack *fs = FakeStack::Create(stack_size_log);  in TEST()  local
96 u8 *base = fs->GetFrame(stack_size_log, 0, 0); in TEST()
97 EXPECT_EQ(base, reinterpret_cast<u8 *>(fs) + in TEST()
98 fs->SizeRequiredForFlags(stack_size_log) + 4096); in TEST()
99 EXPECT_EQ(base + 0*stack_size + 64 * 7, fs->GetFrame(stack_size_log, 0, 7U)); in TEST()
100 EXPECT_EQ(base + 1*stack_size + 128 * 3, fs->GetFrame(stack_size_log, 1, 3U)); in TEST()
101 EXPECT_EQ(base + 2*stack_size + 256 * 5, fs->GetFrame(stack_size_log, 2, 5U)); in TEST()
102 fs->Destroy(0); in TEST()
107 FakeStack *fs = FakeStack::Create(stack_size_log); in TEST() local
115 FakeFrame *ff = fs->Allocate(stack_size_log, cid, 0); in TEST()
118 EXPECT_EQ(x, fs->AddrIsInFakeStack(x)); in TEST()
119 EXPECT_EQ(x, fs->AddrIsInFakeStack(x + 1)); in TEST()
120 EXPECT_EQ(x, fs->AddrIsInFakeStack(x + bytes_in_class - 1)); in TEST()
121 EXPECT_NE(x, fs->AddrIsInFakeStack(x + bytes_in_class)); in TEST()
124 EXPECT_EQ(0UL, fs->Allocate(stack_size_log, cid, 0)); in TEST()
128 fs->Deallocate(reinterpret_cast<uptr>(it->first), it->second); in TEST()
131 fs->Destroy(0); in TEST()
134 static void RecursiveFunction(FakeStack *fs, int depth) { in RecursiveFunction() argument
136 FakeFrame *ff = fs->Allocate(fs->stack_size_log(), class_id, 0); in RecursiveFunction()
138 RecursiveFunction(fs, depth - 1); in RecursiveFunction()
139 RecursiveFunction(fs, depth - 1); in RecursiveFunction()
141 fs->Deallocate(reinterpret_cast<uptr>(ff), class_id); in RecursiveFunction()
146 FakeStack *fs = FakeStack::Create(stack_size_log); in TEST() local
147 RecursiveFunction(fs, 22); // with 26 runs for 2-3 seconds. in TEST()
148 fs->Destroy(0); in TEST()