GType memory allocation - alignment



Hi list !

I've got some questions regarding memory allocation by the GType system.

I plan to experiment some custom types using the GType system, but those
types will require specific memory alignment (in order to use some sse
stuff).
At the present time, my test types are just plain c structures
allocated whether on the stack whether using posix_memalign (), so
i've got no alignment problems.

AFAIK, the GType system allocates data for its instances thanks to the
new GSlice allocator, and i wanted to know if there was a way to
somehow use different memory alignment.
I though of implementing a custom GMemVTable and then setting g_slice*
to always malloc, but i don't really like that idea, every
allocated piece of data would then get aligned with a fixed value ...

That's why i'd like to have smart people point of views :-)


Thanks !




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