0

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 *`
0x90
  • 39,472
  • 36
  • 165
  • 245

1 Answers1

3

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.

Chris Stratton
  • 39,853
  • 6
  • 84
  • 117