bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replacing init_alloc_aligned with a bitmapped allocator


From: Karim Allah Ahmed
Subject: Re: Replacing init_alloc_aligned with a bitmapped allocator
Date: Fri, 16 Apr 2010 09:57:24 +0200

On 4/15/10, Samuel Thibault <samuel.thibault@gnu.org> wrote:
>> -            assert(init_alloc_aligned(round_page(len), &addr));
>> +            assert(init_alloc_aligned(kernel_cmdline_len, &addr));
>
> This is not the same: init_alloc_aligned used to required size aligned
> on the page size.
>
i don't understand this one .. the modified "init_alloc_aligned" does
the same thing.

>> -                    vm_size_t size = m[i].mod_end - m[i].mod_start;
>> +                    vm_size_t size = m[i].mod_end - m[i].mod_start + 1;
>
> Mmm, the multiboot spec is not so much clear whether mod_end is the
> address of the last byte, or the address after the last byte. Your
> change seems to imply the former, is it really so?
>
well, the specs said : "The first two fields contain the start and end
addresses of the boot module itself" . so , i thought that this means
that "mod_end" is the address of the last byte.
Anyway , i modified it and it's now safe in both cases.

All the other things have been fixed.

Attachment: boot_alloc.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]