>>> On 11.05.15 at 14:11, wrote:
> El 11/05/15 a les 12.41, Jan Beulich ha escrit:
> On 11.05.15 at 11:52, wrote:
>>> El 11/05/15 a les 9.42, Jan Beulich ha escrit:
>>> On 08.05.15 at 16:34, wrote:
There actually is another problem here: You must not free the
pages before havin
El 11/05/15 a les 12.41, Jan Beulich ha escrit:
On 11.05.15 at 11:52, wrote:
>> El 11/05/15 a les 9.42, Jan Beulich ha escrit:
>> On 08.05.15 at 16:34, wrote:
>>> There actually is another problem here: You must not free the
>>> pages before having torn down the mapping. An option (to
>>
>>> On 11.05.15 at 11:52, wrote:
> El 11/05/15 a les 9.42, Jan Beulich ha escrit:
> On 08.05.15 at 16:34, wrote:
>>> +void vfree(void *va)
>>> +{
>>> +unsigned int i, pages = vm_size(va);
>>> +
>>> +if ( pages == 0 )
>>> +return;
>>> +
>>> +for ( i = 0; i < pages; i++ )
>>
Hello,
El 11/05/15 a les 9.42, Jan Beulich ha escrit:
On 08.05.15 at 16:34, wrote:
>> +void vfree(void *va)
>> +{
>> +unsigned int i, pages = vm_size(va);
>> +
>> +if ( pages == 0 )
>> +return;
>> +
>> +for ( i = 0; i < pages; i++ )
>> +free_domheap_pages(vmap_to_
>>> On 08.05.15 at 16:34, wrote:
> +void vfree(void *va)
> +{
> +unsigned int i, pages = vm_size(va);
> +
> +if ( pages == 0 )
> +return;
> +
> +for ( i = 0; i < pages; i++ )
> +free_domheap_pages(vmap_to_page(va + i * PAGE_SIZE), 1);
> +
> +vunmap(va);
> +}
There
>>> On 08.05.15 at 16:34, wrote:
> --- a/xen/common/vmap.c
> +++ b/xen/common/vmap.c
> @@ -146,7 +146,7 @@ static unsigned int vm_index(const void *va)
> test_bit(idx, vm_bitmap) ? idx : 0;
> }
>
> -static unsigned int vm_size(const void *va)
> +unsigned int vm_size(const void *va)
>>> On 08.05.15 at 16:50, wrote:
> On 08/05/15 15:34, Roger Pau Monne wrote:
>> +
>> +void *vmalloc(unsigned long size)
>> +{
>> +unsigned long *mfn;
>> +unsigned long pages, i;
>> +struct page_info *pg;
>> +void *va = NULL;
>> +
>> +ASSERT(!in_irq());
>> +
>> +if ( size ==
On 08/05/15 15:34, Roger Pau Monne wrote:
> The allocator uses independent calls to alloc_domheap_pages in order to get
> the desired amount of memory and then maps all the independent physical
> addresses into a contiguous virtual address space.
>
> Signed-off-by: Roger Pau Monné
> Tested-by: Jul
The allocator uses independent calls to alloc_domheap_pages in order to get
the desired amount of memory and then maps all the independent physical
addresses into a contiguous virtual address space.
Signed-off-by: Roger Pau Monné
Tested-by: Julien Grall (ARM)
Cc: Stefano Stabellini
Cc: Ian Camp