Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory alignment question



Hi Zak,

> #1 Is the buffer that is gotten by the driver will always aligned ?

No, it is not guaranteed to be.

> #3 If #1 is no, are there any possilibilty that "Physical is contnue
> but logical is segmented" buffer ?

No, one cannot make assumptions about the physical contiguity of the
memory, if I understood the question correctly. You'll need to code the
routine to take this into account. Remember that most requests will
indeed be aligned on 4 kB boundaries, from the file system, and perhaps
512 B boundaries, from applications  it's not guaranteed, but the case
that handles the non-aligned memory probably need not be excessively
optimal given actual usage patterns.

Dan

On Monday, February 18, 2002, at 07:45 PM, Kazutaka 'Zak' Sawa wrote:

> Hi All,
>
> I have some question related for memory alignment of the buffer that
> is gotten by the driver subclassed from IOBlockStorageDevice.
>
> #1 Is the buffer that is gotten by the driver will always aligned ?
> In other words, is it always guaranteed that the buffer parameter of
> doAsyncReadWrite or doSyncReadWrite is aligned ?
>
> #2 If #1 is yes, how aligned ? 4Bytes ? 8Byte? more ?
>
> #3 If #1 is no, are there any possilibilty that "Physical is contnue
> but logical is segmented" buffer ? Because I need to write a follow-
> up routine.
>
>
> Regards,
>
> Zak
>
>
> <<<< Kazutaka Sawa * yano ELECTRIC CO.,LTD.* >>>>
> <<<< >>>>
> <<<< E-Mail. mailto:email@hidden >>>>
> <<<< URL. http://www.yano-el.co.jp/ >>>>
> <<<< Tel. +81-78-993-0001 Fax. +81-78-997-6491 >>>>
> _______________________________________________
> darwin-drivers mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/darwin-drivers
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.

References: 
 >Memory alignment question (From: "Kazutaka 'Zak' Sawa" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.