|
|
|
|
|
|
| Author |
Message |
gramos2000@gmail.com *nix forums beginner
Joined: 28 Jun 2006
Posts: 7
|
Posted: Mon Jul 17, 2006 4:07 pm Post subject:
Allocate non-cacheable memory question
|
|
|
Hi
Anyone know how to allocate a non-cacheable memory in UNIX (IRIX 6.5 to
be exact). I'm allocating some memory using malloc(), writing into it,
but it seems to be getting some cached data somewhere.
As always, appreciate any input.
Thanks. |
|
| Back to top |
|
 |
Tony 'Nicoya' Mantler *nix forums Guru Wannabe
Joined: 02 Jul 2005
Posts: 139
|
Posted: Mon Jul 17, 2006 5:25 pm Post subject:
Re: Allocate non-cacheable memory question
|
|
|
In article <1153152437.194289.156610@i42g2000cwa.googlegroups.com>,
gramos2000@gmail.com wrote:
: Hi
: Anyone know how to allocate a non-cacheable memory in UNIX (IRIX 6.5 to
: be exact). I'm allocating some memory using malloc(), writing into it,
: but it seems to be getting some cached data somewhere.
: As always, appreciate any input.
SGI systems are cache-coherent, so that shouldn't be your problem. How exactly
are you reading and writing this memory? Perhaps you're missing some
"volatile"s, or require some locking around shared accesses? Is this memory area
aliased (accessed via more than one pointer in the same function)?
If you were allocating via mmap() I would suggest that you need some calls to
msync(), but that doesn't seem to be the case.
Cheers - Tony 'Nicoya' Mantler :)
--
Tony 'Nicoya' Mantler - Master of Code-fu
-- nicoya@ubb.ca -- http://www.ubb.ca/ -- |
|
| Back to top |
|
 |
gramos2000@gmail.com *nix forums beginner
Joined: 28 Jun 2006
Posts: 7
|
Posted: Mon Jul 17, 2006 7:32 pm Post subject:
Re: Allocate non-cacheable memory question
|
|
|
Thanks Tony,
It turns out to be a hardware issue....but thanks for the time and
help.
Always appreciate it.
Tony 'Nicoya' Mantler wrote:
| Quote: | In article <1153152437.194289.156610@i42g2000cwa.googlegroups.com>,
gramos2000@gmail.com wrote:
: Hi
: Anyone know how to allocate a non-cacheable memory in UNIX (IRIX 6.5 to
: be exact). I'm allocating some memory using malloc(), writing into it,
: but it seems to be getting some cached data somewhere.
: As always, appreciate any input.
SGI systems are cache-coherent, so that shouldn't be your problem. How exactly
are you reading and writing this memory? Perhaps you're missing some
"volatile"s, or require some locking around shared accesses? Is this memory area
aliased (accessed via more than one pointer in the same function)?
If you were allocating via mmap() I would suggest that you need some calls to
msync(), but that doesn't seem to be the case.
Cheers - Tony 'Nicoya' Mantler :)
--
Tony 'Nicoya' Mantler - Master of Code-fu
-- nicoya@ubb.ca -- http://www.ubb.ca/ -- |
|
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Mon Dec 01, 2008 10:09 pm | All times are GMT
|
|
Credit Cards | Cell Phones | Free Advertising | Mortgages | Mortgages
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|