[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 12/16] x86/efi: create new early memory allocator
>>> On 08.09.16 at 10:29, <daniel.kiper@xxxxxxxxxx> wrote: > On Wed, Sep 07, 2016 at 08:01:31AM -0600, Jan Beulich wrote: >> >>> On 07.09.16 at 14:05, <daniel.kiper@xxxxxxxxxx> wrote: >> > On Mon, Sep 05, 2016 at 06:33:57AM -0600, Jan Beulich wrote: >> >> >>> On 20.08.16 at 00:43, <daniel.kiper@xxxxxxxxxx> wrote: >> >> > + if ( ebmalloc_free == NULL ) >> >> > + ebmalloc_free = ebmalloc_mem; >> >> > + >> >> > + ptr = ebmalloc_free; >> >> > + >> >> > + ebmalloc_free += size; >> >> >> >> No minimal (at least pointer size) alignment getting enforced >> >> somewhere here? >> > >> > For what? >> >> To avoid the penalty unaligned accesses incur? And that's alongside >> the fact that it's simply bad practice to knowingly but without actual >> need cause unaligned accesses even if they work fine. > > I expected that but I do not think it is very important here. Anyway, > I am still not sure why you say "at least pointer size". Because > sizeof(void *) assures proper alignment on any architecture? Yes, this gives (on "normal" architectures at least) machine word size alignment, which commonly is good enough for everything except SIMD data (or things similar to it). > Additionally, will this alignment sufficiently replace alignment > provided by current efi_arch_allocate_mmap_buffer() implementation? Just compare __alignof__(EFI_MEMORY_DESCRIPTOR) and __alignof__(void *). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |