#
7e3e823b |
| 15-Jan-2021 |
Claudio Imbrenda <imbrenda@linux.ibm.com> |
lib/alloc.h: remove align_min from struct alloc_ops
Remove align_min from struct alloc_ops, since it is no longer used.
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Krish S
lib/alloc.h: remove align_min from struct alloc_ops
Remove align_min from struct alloc_ops, since it is no longer used.
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com> Message-Id: <20210115123730.381612-7-imbrenda@linux.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
da7eceb3 |
| 03-Apr-2018 |
Thomas Huth <thuth@redhat.com> |
lib/alloc: Fix/check the prototypes in the allocator files
We should make sure that the prototypes match the implementations and thus include the alloc_page.h header from alloc_page.c, and the alloc
lib/alloc: Fix/check the prototypes in the allocator files
We should make sure that the prototypes match the implementations and thus include the alloc_page.h header from alloc_page.c, and the alloc_phys.h header from alloc_phys.c. This way the file can be compiled with -Wmissing-prototypes and -Wstrict-prototypes, too.
Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1522743052-8266-1-git-send-email-thuth@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
2b527259 |
| 17-Jan-2018 |
Andrew Jones <drjones@redhat.com> |
phys_alloc: ensure we account all allocations
Also throw another assert into phys_alloc_aligned_safe.
Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.co
phys_alloc: ensure we account all allocations
Also throw another assert into phys_alloc_aligned_safe.
Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
#
11c4715f |
| 23-Oct-2017 |
Paolo Bonzini <pbonzini@redhat.com> |
alloc: implement free
Track block size in lib/alloc.c and not in alloc_ops. alloc_ops->free gets the size from the malloc implementation.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
937e2392 |
| 23-Oct-2017 |
Paolo Bonzini <pbonzini@redhat.com> |
x86: use alloc_phys
As the next step in making vmalloc/vfree available to every other architecture, register the available memory with phys_alloc for x86 too, and add a service to return the unused
x86: use alloc_phys
As the next step in making vmalloc/vfree available to every other architecture, register the available memory with phys_alloc for x86 too, and add a service to return the unused phys_alloc region. This makes setup_vm architecture- independent.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
dc47ac61 |
| 22-Oct-2017 |
Paolo Bonzini <pbonzini@redhat.com> |
lib: simplify alloc_ops
Layer malloc/calloc/free/memalign over a basic allocator. The implementation of high-level routines remains the basic one from before, but the callback interface is reduced t
lib: simplify alloc_ops
Layer malloc/calloc/free/memalign over a basic allocator. The implementation of high-level routines remains the basic one from before, but the callback interface is reduced to a single function. Since alloc.c now contains the physical address allocator only, rename it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
fd6aada0 |
| 17-May-2017 |
Radim Krčmář <rkrcmar@redhat.com> |
use %# instead of 0x% in all format strings
It's one character shorter, properly prefixed, and also provides error detection: %#d triggers a warning.
Done with `sed -i 's/0x%/%#/g' **/*.[ch]` to mo
use %# instead of 0x% in all format strings
It's one character shorter, properly prefixed, and also provides error detection: %#d triggers a warning.
Done with `sed -i 's/0x%/%#/g' **/*.[ch]` to motivate the use of %#, existing padding was raised by 2 to account for the counted "0x" (output should be the same).
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
#
633e2198 |
| 12-Dec-2016 |
Peter Xu <peterx@redhat.com> |
libcflat: moving MIN/MAX here
That's something can be used outside alloc.c.
Reviewed-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Paolo Bonzini <
libcflat: moving MIN/MAX here
That's something can be used outside alloc.c.
Reviewed-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
8d2ff97f |
| 03-Mar-2016 |
Andrew Jones <drjones@redhat.com> |
lib/alloc: fix format warnings, add/use PRIx64
Also add casts, in case phys_addr_t is only a u32.
Signed-off-by: Andrew Jones <drjones@redhat.com> Message-Id: <1457008388-12749-3-git-send-email-drj
lib/alloc: fix format warnings, add/use PRIx64
Also add casts, in case phys_addr_t is only a u32.
Signed-off-by: Andrew Jones <drjones@redhat.com> Message-Id: <1457008388-12749-3-git-send-email-drjones@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
c1049d56 |
| 06-Nov-2015 |
Andrew Jones <drjones@redhat.com> |
trivial: alloc: don't use 'top' outside spinlock
This is a fix just due to being too much of a type-A person. I noticed the issue while reading over the function, and decided to fix it, even though
trivial: alloc: don't use 'top' outside spinlock
This is a fix just due to being too much of a type-A person. I noticed the issue while reading over the function, and decided to fix it, even though it's unlikely to be a problem ever because top is read-mostly (like written once, then only read, type of mostly).
Signed-off-by: Andrew Jones <drjones@redhat.com> Message-Id: <1446769483-21586-4-git-send-email-drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
15e51681 |
| 29-Jul-2015 |
Andrew Jones <drjones@redhat.com> |
alloc: only warn once if we run out of log entries
Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
d1da56b4 |
| 30-Oct-2014 |
Andrew Jones <drjones@redhat.com> |
lib: add ALIGN() macro
Add a type-considerate ALIGN[_UP] macro to libcflat, and apply it to /lib code that can make use of it. This will be used to fix PAGE_ALIGN on arm, which can be used on phys_a
lib: add ALIGN() macro
Add a type-considerate ALIGN[_UP] macro to libcflat, and apply it to /lib code that can make use of it. This will be used to fix PAGE_ALIGN on arm, which can be used on phys_addr_t addresses, which may exceed 32 bits.
Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
417d4762 |
| 10-Jul-2014 |
Andrew Jones <drjones@redhat.com> |
Introduce lib/alloc
alloc supplies three ingredients to the test framework that are all related to the support of dynamic memory allocation.
The first is a set of alloc function wrappers for malloc
Introduce lib/alloc
alloc supplies three ingredients to the test framework that are all related to the support of dynamic memory allocation.
The first is a set of alloc function wrappers for malloc and its friends. Using wrappers allows test code and common code to use the same interface for memory allocation at all stages, even though the implementations may change with the stage, e.g. pre/post paging.
The second is a set of implementations for the alloc function interfaces. These implementations are named early_*, as they can be used almost immediately by the test framework.
The third is a very simple physical memory allocator, which the early_* alloc functions build on.
Signed-off-by: Andrew Jones <drjones@redhat.com> --- v7: expanded from only supplying the alloc function wrappers to including early_* and phys_alloc [Paolo Bonzini]
show more ...
|