Re: O_DIRECT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rogier Wolff <R.E.Wolff@xxxxxxxxxxxx> wrote:
>
> The code
>  we use is: 
> 
>    p = malloc (blocksize + PAGE_SIZE);
>    buf = (void *) ((  ((long)p) + PAGE_SIZE -1 ) & ~(PAGE_SIZE-1));

memalign() and posix_memalign() will do this for you.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux