Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 5 Jul 2017 08:45:40 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] optimize malloc0

On Wed, Jul 05, 2017 at 10:49:10AM +0200, Szabolcs Nagy wrote:
> * Rich Felker <dalias@...c.org> [2017-07-04 19:39:10 -0400]:
> > On Wed, Jul 05, 2017 at 02:09:21AM +0300, Alexander Monakov wrote:
> > > I can rewrite it fully forward scanning without much trouble, but I
> > > think it wouldn't be for the better.
> > 
> > *nod* I'll re-check the version you submitted just to be sure I
> > understand and agree that it's doing what I think it is, with the plan
> > of going with it or something very similar. I might add some comments
> > as a follow-up patch.
> 
> i think may_alias should be added and uint64_t used
> instead of unsigned long long (which may have a size
> that does not divide pagesize)

I agree about may_alias (forgot to mention that; believe we discussed
it on IRC before). I don't think ull is a practical issue (there are
probably other places we assume all integer types have power-of-two
sizes and this seems like a totally reasonable assumption) but I don't
mind changing it to uint64_t for obviousness/generality. Hidden
assumptions like this tend to bite future readers.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.