Message-ID: <3915881A.13BE1702@softhome.net> Date: Sun, 07 May 2000 18:13:30 +0300 From: Laurynas Biveinis X-Mailer: Mozilla 4.72 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: "Mark E." CC: DJGPP Workers Subject: Re: Perfomance of gc-simple References: <3913BE88 DOT 44A89056 AT softhome DOT net> <39155472 DOT 28917 DOT 25EC84 AT localhost> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com "Mark E." wrote: > > /* Now align the pointer. */ > aligned_ptr = (char *)((unsigned long)(unaligned_ptr + page_size) & ~(page_size - > 1)); > > /* Record location to pass to free() in unused allocated space. */ > *((char **)(aligned_ptr - ptr_size)) = unaligned_ptr; Could it be that unused allocated space is too small to hold a pointer and it will be corrupted? Right now I'm playing with other (but similar) fix to ggc-page - allocating pointer with malloc, aligning it, and remembering two pointers - one for users, other for free(). Laurynas Biveinis