8B - 1KB.
1KB - 256KB.
17 {
18
20
22
23 void* start = nullptr;
24 void* end = nullptr;
25
29 for (int i = 8; i < 1024; i+= 8)
30 {
32 const size_t actualSize = cc.
FetchRange(start, end, UINT32_MAX, alignBytes);
33
34 EXPECT_NE(start, nullptr);
35 EXPECT_NE(end, nullptr);
36
37 EXPECT_NE((char*)start + actualSize * alignBytes, (char*)end);
38
40 }
41
45 for (int i = 1024; i < 256 * 1024; i += 8 * 1024)
46 {
48 const size_t acturlSize = cc.
FetchRange(start, end, UINT32_MAX, alignBytes);
49
50 EXPECT_NE(start, nullptr);
51 EXPECT_NE(end, nullptr);
52
53 EXPECT_NE((char*)start + acturlSize * alignBytes, (char*)end);
54
56 }
57 }
#define SPICESTEST_PROFILE_FUNCTION()
size_t FetchRange(void *&start, void *&end, size_t batchNum, size_t size)
Fetch range memory to tc.
void ReleaseListToSpans(void *start, size_t size)
Release memory to pc.
Central memory cache. Second level of memory allocator.
static size_t AlignUp(size_t size)
Align up memory bytes.