This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Perfomance of gc-simple


> 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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]