2012-04-27

Linux C: page aligned buffer


I had to allocate a page-aligned buffer.



Alignment

char buf[1024] __attribute__ ((aligned (8)));

Unfortunately it is unusable for page alignment, because we haven't any PAGE_SIZE macro in user space.

Getting page size



Page align



References:
http://froebe.net/blog/2007/05/10/linux-o_directio-what-am-i-doing-wrong/

2 comments:

mohit said...

It is nice blog Thank you provide important information and i am searching for same information to save my time Big data hadoop online Training
ivanka trump hot pictures

mary Brown said...

Security testing is must. Everybody wants security at every level of his working. as explained above failures are happened but if we test time to time then it will improve. So it depend on us how much we are serious about this.
Adversarial Learning for Constrained Image Splicing Detection and Localization based on Atrous Convolution Project For CSE
An Attribute based Controlled Collaborative Access Control Scheme for Public Cloud Storage Project For CSE
Bio Protocol Watermarking on Digital Micro fluidic Bio chips Project For CSE
Bounds for Binary Linear Locally Repairable Codes via a Sphere Packing Approach Project For CSE
CNN based Adversarial Embedding for Image Steganography Project For CSE
Distributed Secure Switch and Stay Combining over Correlated Fading Channels Project For CSE

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Top WordPress Themes