[Gc] suspicion in GC_free about BZERO((word *)p + 1, WORDS_TO_BYTES(sz-1))

Alexander Petrossian (PAF) Alexander.Petrossian at teligent.ru
Wed Dec 12 09:09:36 PST 2007


Hans, colleagues,

void GC_free(p)

has this bit

        if (ok -> ok_init) {
            BZERO((word *)p + 1, WORDS_TO_BYTES(sz-1));
        }

I don't feel right about this +-1 thing. 
Is it valid?

Wouldn't it be better
	BZERO((word *)p, WORDS_TO_BYTES(sz));
?

Thanks in advance
-- 
Alexander Petrossian (PAF), Software Developer, Teligent Russia



More information about the Gc mailing list