Lines Matching refs:maxAlignment
33 int requestedSize, int assumedAlignment, int blockSize, int maxAlignment) {
35 SkASSERT_RELEASE(SkIsPow2(assumedAlignment) && SkIsPow2(maxAlignment));
37 const int minAlignment = std::min(maxAlignment, assumedAlignment);
39 // maxAlignment. When that happens, the term maxAlignment - minAlignment is zero, and the
42 // The subtle case is where minAlignment < maxAlignment. Because
43 // minAlignment < maxAlignment, alignUp(requestedSize, minAlignment) + blockSize does not
44 // guarantee that block can be placed at a maxAlignment address. Block can be placed at
45 // maxAlignment/minAlignment different address to achieve alignment, so we need
46 // to add memory to allow the block to be placed on a maxAlignment address.
47 // For example, if assumedAlignment = 4 and maxAlignment = 16 then block can be placed at
54 // (maxAlignment/minAlignment - 1) * minAlignment
55 // = maxAlignment - minAlignment.
58 + maxAlignment - minAlignment;