I am trying to implement a double buffer using ioctl(fd, FBIOPAN_DISPLAY... my single buffer code works fine
screensize = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel / 8;
fbp = (char*)mmap(0, screensize, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0);
when I try to increase the "length parameter" by using screensize*2, the mmap
fails with EINVAL
. I think it doesn't like my length parameter.
The screen size for a single buffer is 6,220,800 and for the double buffer is 12,441600. This is an embedded system but it has 1 Gig of RAM.
The length parameter is size_t which on this system is only 4 bytes which would make me think that the max size I could use would be 4 Meg, yet 6 Meg works fine so I think I am missing something really simple. Is there a way to mmap
a buffer larger than size_t?