This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mlock in cache


On 08/02/2013 03:27 PM, Andrew Haley wrote:
__builtin_prefetch() is what you need. However, there's no way you'll be able to lock anything in L1: it'll be evicted very shortly afterwards. Andrew.

Sorry for that, but from what I see __builtin_prefetch() just fetches in advance the related pages but it does not guarantee that thy won't be thrown out of the cache. I want to know if there is some way to prefetch and lock some memory unit in cache. I'm pretty sure that there should be a way for this to be done in assembly, but I don't know for C or some gcc built-in

--
Christos Tsopokis


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]