Lines Matching refs:start
19 allocate(uint16_t start, int32_t length)
21 if (start + length > fNumBits)
26 if (fLargestStart == start) {
27 // cut from start
31 } else if (start > fLargestStart
32 && start < fLargestStart + fLargestLength) {
34 fLargestLength = start - fLargestStart;
48 free(uint16_t start, int32_t length)
50 if (start + length > fNumBits)
54 if (!(!fLargestValid || start + length <= fLargestStart
55 || start > fLargestStart))
59 && (start + length == fLargestStart
60 || fLargestStart + fLargestLength == start
61 || (start < fLargestStart && fLargestStart > fLargestLength)
62 || (start > fLargestStart
81 error = "start differ";
97 int32_t start, int32_t length, int32_t nextLargestStart,
105 fLargestLength, start, length);
107 allocate(start, length);
113 test_free(int32_t num, int32_t largestStart, int32_t largestLength, int32_t start,
122 start, length);
124 free(start, length);
133 test_allocate(1, 40, 50, 20, 20, 40, 50, true); // touch start
134 test_allocate(2, 40, 50, 20, 19, 40, 50, true); // don't touch start
135 test_allocate(3, 40, 10, 40, 1, 41, 9, false); // cut start
136 test_allocate(4, 40, 50, 40, 1, 41, 49, true); // cut start
140 test_allocate(8, 0, 51, 0, 1, 1, 50, true); // cut start
141 test_allocate(9, 0, 51, 0, 2, 2, 49, true); // cut start
142 test_allocate(10, 0, 51, 0, 3, 3, 48, false); // cut start
145 test_free(1, 40, 50, 20, 20, 40, 50, false); // touch start
146 test_free(2, 40, 50, 20, 19, 40, 50, true); // before start
147 test_free(3, 50, 40, 20, 19, 40, 50, false); // before start