lkml.org 
[lkml]   [2003]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: shmat problem
From
Date
"Dirk Bull" <dirkbull102@hotmail.com> writes:

> I have a problem with the shmat() function. It works correctly when
> one doesn't specify an address where the segment should be attached,
> but fails when one does. To specify an address it must be alligned
> and I did by using __attribute__ (aligned()). Still the function
> fails. What is the most effective way for a solution
> to this problem.

__attribute__(aligned()) has nothing to do with it--the address needs
to be page-aligned (ie on a multiple of 4K for ix86), unless SHM_RND
is set in the call. You also need to make sure nothing else is mapped
at the address you're trying to use...

-Doug
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.034 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site