Controlling buffer alignment in file.read()

Haralanov, Mitko mitko.haralanov at intel.com
Tue Mar 18 19:13:46 EDT 2014


> For control at that level you'd be better off using
> direct system calls, i.e. os.open() and os.read(),
> then you can read exacty the number of bytes you want.
> 

The problem is not controlling the number of bytes read. That part seems to be working.
The issue is that the buffer into which the data is placed needs to be of certain alignment (8byte-aligned). Python does not seem to have a way that allows me to control that.

Thanks,
- Mitko



More information about the Python-list mailing list