This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Disabling cache for some data
- From: Claudio Scordino <cloud dot of dot andor at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 20 Apr 2007 16:12:42 +0200
- Subject: Disabling cache for some data
Hi,
I have to write a dummy testing program which continuously reads 2 bytes on
RAM, fills a buffer, and then sends all the data through the Ethernet interface.
It's used just to evaluate the maximum throughput that I would have reading from
memory and sending to Ethernet.
However, If I read always the same data, the processor uses the cache and does
not perform a memory read.
My question is: how can I tell gcc to not cache such data ?
Many thanks for any help and suggestion,
Claudio