Unix Technical Forum

Alignment of shmat()'s returned value

This is a discussion on Alignment of shmat()'s returned value within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> man shmat(): HP-UX 11i Version 2: August 2003 > uname -smrsv HP-UX B.11.23 U ia64 void* ptr = shmat ...


Go Back   Unix Technical Forum > Unix Operating Systems > HP-UX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-04-2008, 07:19 AM
Alex Vinokur
 
Posts: n/a
Default Alignment of shmat()'s returned value

man shmat(): HP-UX 11i Version 2: August 2003

> uname -smrsv

HP-UX B.11.23 U ia64

void* ptr = shmat (shmid, 0, shmflg);
assert (ptr != SHM_FAILED);

Can it be guaranteed that ptr has a priory known alignment?
For instanse, two hexadecimal nulls at the end: 0xnnn...nnn00 ?



Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-04-2008, 07:19 AM
Dennis Handly
 
Posts: n/a
Default Re: Alignment of shmat()'s returned value

Alex Vinokur wrote:
> Can it be guaranteed that ptr has a priory known alignment?


They should be at least page aligned, typically 0x1000.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:06 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com