M
Michael N. Moran
I work on embedded systems using C++ and frequently
need to create an interface that requires a pointer
to memory that is aligned to cache and/or page boundaries.
This is a typical requirement for DMA transfers.
What I think I would like, is a means to qualify a pointer
such that the compile-time type checking could ensure that
the client programs pass an appropriately aligned
argument to the interface.
Obviously, such a feature would require the programmer
to give the cache line size and page size to the compiler.
Has this been discussed before? References? Thoughts?
As this is my first posting to comp.lang.c++, I'm not
even certain that this is the appropriate forum.
--
Michael N. Moran (h) 770 516 7918
5009 Old Field Ct. (c) 678 521 5460
Kennesaw, GA 30144
"... abstractions save us time working, but they don't
save us time learning."
Joel Spolsky, The Law of Leaky Abstractions
The Beatles were wrong: 1 & 1 & 1 is 1
need to create an interface that requires a pointer
to memory that is aligned to cache and/or page boundaries.
This is a typical requirement for DMA transfers.
What I think I would like, is a means to qualify a pointer
such that the compile-time type checking could ensure that
the client programs pass an appropriately aligned
argument to the interface.
Obviously, such a feature would require the programmer
to give the cache line size and page size to the compiler.
Has this been discussed before? References? Thoughts?
As this is my first posting to comp.lang.c++, I'm not
even certain that this is the appropriate forum.
--
Michael N. Moran (h) 770 516 7918
5009 Old Field Ct. (c) 678 521 5460
Kennesaw, GA 30144
"... abstractions save us time working, but they don't
save us time learning."
Joel Spolsky, The Law of Leaky Abstractions
The Beatles were wrong: 1 & 1 & 1 is 1