vmbase: Rename configure_global_allocator_size
Test: -
Change-Id: Iae7130f235893a4ac8a55f8f5d2295eea22193ef
diff --git a/pvmfw/src/entry.rs b/pvmfw/src/entry.rs
index 10a3e5a..6f96fc0 100644
--- a/pvmfw/src/entry.rs
+++ b/pvmfw/src/entry.rs
@@ -31,7 +31,7 @@
use log::LevelFilter;
use vmbase::util::RangeExt as _;
use vmbase::{
- configure_global_allocator_size, console,
+ configure_heap, console,
layout::{self, crosvm},
logger, main,
memory::{min_dcache_line_size, MemoryTracker, MEMORY, SIZE_128KB, SIZE_4KB},
@@ -61,7 +61,7 @@
}
main!(start);
-configure_global_allocator_size!(SIZE_128KB);
+configure_heap!(SIZE_128KB);
/// Entry point for pVM firmware.
pub fn start(fdt_address: u64, payload_start: u64, payload_size: u64, _arg3: u64) {
diff --git a/rialto/src/main.rs b/rialto/src/main.rs
index 7b3783a..ce83624 100644
--- a/rialto/src/main.rs
+++ b/rialto/src/main.rs
@@ -31,7 +31,7 @@
use libfdt::FdtError;
use log::{debug, error, info};
use vmbase::{
- configure_global_allocator_size,
+ configure_heap,
fdt::SwiotlbInfo,
layout::{self, crosvm},
main,
@@ -165,4 +165,4 @@
}
main!(main);
-configure_global_allocator_size!(SIZE_64KB);
+configure_heap!(SIZE_64KB);
diff --git a/vmbase/example/src/main.rs b/vmbase/example/src/main.rs
index ccae6ca..b3b5732 100644
--- a/vmbase/example/src/main.rs
+++ b/vmbase/example/src/main.rs
@@ -33,7 +33,7 @@
use fdtpci::PciInfo;
use libfdt::Fdt;
use log::{debug, error, info, trace, warn, LevelFilter};
-use vmbase::{configure_global_allocator_size, cstr, logger, main, memory::SIZE_64KB};
+use vmbase::{configure_heap, cstr, logger, main, memory::SIZE_64KB};
static INITIALISED_DATA: [u32; 4] = [1, 2, 3, 4];
static mut ZEROED_DATA: [u32; 10] = [0; 10];
@@ -43,7 +43,7 @@
const ROOT_LEVEL: usize = 1;
main!(main);
-configure_global_allocator_size!(SIZE_64KB);
+configure_heap!(SIZE_64KB);
/// Entry point for VM bootloader.
pub fn main(arg0: u64, arg1: u64, arg2: u64, arg3: u64) {
diff --git a/vmbase/src/heap.rs b/vmbase/src/heap.rs
index 08240b9..b00ca6f 100644
--- a/vmbase/src/heap.rs
+++ b/vmbase/src/heap.rs
@@ -29,7 +29,7 @@
/// Configures the size of the global allocator.
#[macro_export]
-macro_rules! configure_global_allocator_size {
+macro_rules! configure_heap {
($len:expr) => {
static mut __HEAP_ARRAY: [u8; $len] = [0; $len];
#[export_name = "HEAP"]
@@ -39,7 +39,7 @@
}
extern "Rust" {
- /// Slice used by the global allocator, configured using configure_global_allocator_size!().
+ /// Slice used by the global allocator, configured using configure_heap!().
static mut HEAP: &'static mut [u8];
}