try to fix bad aliasing in GC src

svn: r11463
This commit is contained in:
Matthew Flatt 2008-08-28 08:10:44 +00:00
parent fb9d781cfd
commit 6fb9a4243f

View File

@ -665,13 +665,16 @@ long GC_compute_alloc_size(long sizeb)
long GC_initial_word(int sizeb)
{
struct objhead _info;
long w;
sizeb = ALIGN_BYTES_SIZE(gcWORDS_TO_BYTES(gcBYTES_TO_WORDS(sizeb)) + WORD_SIZE);
memset(&_info, 0, sizeof(_info));
_info.size = (sizeb >> gcLOG_WORD_SIZE);
return *(long *)(void *)&_info;
memcpy(&w, &_info, sizeof(long));
return w;
}
long GC_alloc_alignment()