Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30328dc7-2779-4bf6-a871-34270fb44244@cs.ucla.edu>
Date: Fri, 28 Jun 2024 23:02:49 +0100
From: Paul Eggert <eggert@...ucla.edu>
To: libc-coord@...ts.openwall.com, Florian Weimer <fweimer@...hat.com>,
 enh <enh@...gle.com>
Cc: Zijun Zhao <zijunzhao@...gle.com>
Subject: Re: aligned_realloc()

On 6/28/24 07:55, Florian Weimer wrote:
> I don't think many allocators keep track of alignment at time of
> allocation explicitly, so I don't see there is much that can be done
> except effectively ignoring the original allignment for the purposes of
> reallocation.

The memory allocator needn't track the original alignment explicitly. 
Instead, realloc, when moving data, can allocate replacement memory with 
the same alignment as the incoming pointer. Although this would likely 
mean more fragmentation, it might not be all that bad in practice, at 
least for people who care about alignment more than fragmentation.

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.