This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Alignment of malloc returned pointer


Hi,

In glibc, I understand that the alignment of the pointer returned by
malloc is aligned to at least __alignof__ (long double). For our
target, we want to have a different version of malloc that return the
pointer with less alignment compared to __alignof__ (long double) and
leave the existing malloc version as is.

1) Is it possible to have two versions of malloc in glibc i.e. one
with at least __alignof__ (long double) and other with less alignment?
2) If possible, can I just copy the existing '__libc_malloc'
implementation and tweak it to arrive at the other malloc version with
less alignment?
3) Is there anything in particular that I need to care about for the
two malloc versions to co-exist and function properly?

Thanks,
Venkata Ramanaiah N


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]