In some framebuffer configuration code I had seen these lines:
static unsigned int max_size = 0;
max_size = max(max_size, 8*(mi->xres * (mi->xres + mi->yres)));
}
max_size = PAGE_ALIGN(max_size);
What does PAGE_ALIGN do to and unsigned int? shouldn’t it get an address?
mi is `struct fb_videomode *`
It rounds the size up to an exact multiple of the page size (often something like 4k, though implementation-dependent).
In this case, it’s not applying to an absolute address, but instead to a size – which will likely become a difference between addresses.