Juergen Keil wrote:
> Mark Johnson wrote: 
>> Paul Durrant wrote:
>>> Where was your memory allocated from? 62268 / 4096 is > 15 (~15.2). As I 
>>> calculate it; at worst, this means it may take 17 cookies to map it, not 
>>> 16. I imagine you hit this worst case and thus you got the wanring 
>>> because you're unable to accept partial mappings.
>> No, 62268 bytes should take 16 cookies worse case...
> 
> No, 61440 bytes needs 15 cookies, best case.
> 
> And 62268 bytes needs 16 cookies, best case.  In case the 62268 byte
> buffer isn't page aligned we need 17 cookies.

Hmm, I'm running a little slow this morning...

You would think I would know this since I wrote
the code, but I trust Juergen more than I trust myself :-)

61440 bytes needs 15 cookies, best case, 16 worse case

for 61442 bytes, best case 16 cookies..

The buffer offset can be 0 - 4095. For a worse case
offset of 4095, you have 1 byte in the first cookie,
and 15 cookies with full pages, and 1 byte in the last
page, for a total of 17 cookies..

Like Juergen and Paul said, worse case is 17 cookies :-)



MRJ



_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to