C question - headers in mmaped files
Martin Pool
mbp at sourcefrog.net
Tue Apr 1 21:39:35 EST 2003
On 1 Apr 2003, Jepri <jepri at webone.com.au> wrote:
> map = (char *) mmap(etc etc)
> head = (header *) map;
> dat = (data *) map+64;
This is equivalent to
((data *) map) + 64
It advances the pointer by the size of 64 maps.
> What's the right way to do this?
Study C harder, so that you can get operator precedence right. ;-)
http://www.isthe.com/chongo/tech/comp/c/index.html
--
Martin
More information about the linux
mailing list