rong1129/android-binder-ipc — comment on commit bdc050fcf0b7f33a310a01557c6cfea417a954df
File:  line 0
By rong1129:

Thanks for the message. You are right, there's alignment issue I forgot to
consider. I'm also thinking to improve the interface of fast_slob a bit, so
I will be pushing out the fix along with other changes soon.

I've been testing on goldfish emulator, which might be why the alignment
issue didn't show up in the first place. But I did found out that the
application crash was due to some other reason, will push out that change
very soon as well.

Thanks again for pointing that out.

Regards,

Rong

On Mon, Feb 20, 2012 at 4:14 PM, syndtr <
reply@reply.github.com
> wrote:

> The crasses can be caused by the buffer that allocated by fast slob is not
> well aligned. I implementing your fast slob in the old binder and get
> BUS_ADRALN, which mean Invalid address alignment.
> Fix it with this:
> #define MAX_ALLOC_SIZE 98304
> #define ALLOC_SIZE_SHIFT 3
> #define NUM_BUCKETS 4
>
> The NUM_BUCKETS must not be odd number. Hope it helps.
>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/rong1129/android-binder-ipc/commit/bdc050fcf0b7f33a310a01557c6cfea417a954df#commitcomment-983624
>