[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: As i suspected, unaligned access



>>>>> "OL" == Oscar Levi <elf@buici.com> writes:

    OL> is a structure member.  The last member of the hash table is a
    OL> pointer that is misaligned.  Oddly, the first byte of the
    OL> malloc'd structure is also misaligned.  I would expect malloc
    OL> to return a pointer to 64 bit aligned data on the alpha.  How
    OL> am I supposed to handle this?

  *boggle* malloc(3) should *always* return a naturally aligned
block. smail doesn't happen to ship with it's own memory allocator,
does it? Alternatively, could it be allocating a larger chunk of
memory and then splitting it up inside the program into multiple
structures? If you can't get it to work any other way, try using
memalign(3).

m.


Reply to: