Suitably aligned pointers

Dave Hammond daveh at marob.MASA.COM
Sat Oct 15 00:03:16 AEST 1988


We use a pretty basic set of memory management routines which
allocate large hunks of memory and parcel it out as requested,
saving malloc the headache of managing huge lists of small buffers.
The problem is the routines don't return a `suitably aligned' pointer,
so the accuracy of casting the return to other than char * is in doubt.

Can someone explain the technique used to suitably align a pointer ?

Dave Hammond
  UUCP: ...!uunet!masa.com!{marob,dsix2}!daveh
DOMAIN: daveh at marob.masa.com
----------------------------------------------------------------------------



More information about the Comp.lang.c mailing list