This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Perfomance of gc-simple
- To: gcc at gcc dot gnu dot org, snowball3 at bigfoot dot com
- Subject: Re: Perfomance of gc-simple
- From: Mike Stump <mrs at windriver dot com>
- Date: Mon, 8 May 2000 10:24:49 -0700 (PDT)
- Cc: djgpp-workers at delorie dot com, lauras at softhome dot net
> From: "Mark E." <snowball3@bigfoot.com>
> To: gcc@gcc.gnu.org
> Date: Sun, 7 May 2000 11:33:06 -0400
> static const unsigned int ptr_size = sizeof(char *);
> void *
> vmalloc (size_t size)
> {
Nope, not right, buggy.
Use sizeof char* == 1, page size == 2, request size == 2 and malloc
returns aligned (%4 == 0) value to see an example that doesn't work.
If you rewrite the code to be cleaner, it would have worked.