* David Chisnall <[email protected]> [12/06/30 00:47]: > Objects must be word aligned. This is both a requirement for the small > object support, and an ABI requirement, as the first instance variable in > every word is the class pointer (which, as a pointer, must be word aligned in > a structure). If your custom allocator is not returning word-aligned memory, > then you have a bug if you are trying to use it for Objective-C objects. > > There are many things in the compiler that also assume that object allocators > return word-aligned memory - if you're breaking this invariant then expect > large amounts of pain.
Hello David, Thank you for explanation. We are fairly new to Objective C, moving to it from plain C, and haven't had this problem before. BTW, I had to tweak libobjc2 source a bit to compile it with gcc on Linux. The patch fixes INIT_LOCK() compile error when _GNU_SOURCE is defined and removes a number of "taking address of expression of type 'void'" warnings. Would you be interested in it? Should I send it to this list? -- http://tarantool.org - an efficient, extensible in-memory data store _______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
