diff --git a/base/include/base/allocator_guard.h b/base/include/base/allocator_guard.h index b2101e5b7..9fd25c68e 100644 --- a/base/include/base/allocator_guard.h +++ b/base/include/base/allocator_guard.h @@ -70,7 +70,7 @@ namespace Genode { bool alloc(size_t size, void **out_addr) { if ((_amount - _consumed) < (size + _allocator->overhead(size))) { - PWRN("Quota exceeded! amount=%zd, size=%zd, consumed=%zd", + PWRN("Quota exceeded! amount=%zu, size=%zu, consumed=%zu", _amount, (size + _allocator->overhead(size)), _consumed); return false; } diff --git a/base/include/root/component.h b/base/include/root/component.h index 7706689bf..64d984dcd 100644 --- a/base/include/root/component.h +++ b/base/include/root/component.h @@ -203,7 +203,7 @@ namespace Genode { size_t needed = sizeof(SESSION_TYPE) + md_alloc()->overhead(sizeof(SESSION_TYPE)); if (needed > ram_quota) { - PERR("Insufficient ram quota, provided=%zd, required=%zd", + PERR("Insufficient ram quota, provided=%zu, required=%zu", ram_quota, needed); throw Root::Quota_exceeded(); } @@ -221,7 +221,7 @@ namespace Genode { char adjusted_args[MAX_ARGS_LEN]; strncpy(adjusted_args, args.string(), sizeof(adjusted_args)); char ram_quota_buf[64]; - snprintf(ram_quota_buf, sizeof(ram_quota_buf), "%zd", + snprintf(ram_quota_buf, sizeof(ram_quota_buf), "%zu", remaining_ram_quota); Arg_string::set_arg(adjusted_args, sizeof(adjusted_args), "ram_quota", ram_quota_buf); diff --git a/base/include/trace_session/connection.h b/base/include/trace_session/connection.h index 7ce1d570a..9afe6bb46 100644 --- a/base/include/trace_session/connection.h +++ b/base/include/trace_session/connection.h @@ -31,7 +31,7 @@ struct Genode::Trace::Connection : Genode::Connection, */ Connection(size_t ram_quota, size_t arg_buffer_size, unsigned parent_levels) : Genode::Connection( - session("ram_quota=%zd, arg_buffer_size=%zd, parent_levels=%u", + session("ram_quota=%zu, arg_buffer_size=%zu, parent_levels=%u", ram_quota, arg_buffer_size, parent_levels)), Session_client(cap()) { } }; diff --git a/base/src/base/child/child.cc b/base/src/base/child/child.cc index aa6122b8e..19d29031e 100644 --- a/base/src/base/child/child.cc +++ b/base/src/base/child/child.cc @@ -57,7 +57,7 @@ namespace { { if (_from.valid() && _to.valid() && Ram_session_client(_from).transfer_quota(_to, quantum)) { - PWRN("not enough quota for a donation of %zd bytes", quantum); + PWRN("not enough quota for a donation of %zu bytes", quantum); throw Parent::Quota_exceeded(); } } diff --git a/base/src/base/env/platform_env.h b/base/src/base/env/platform_env.h index 6823a4144..375574958 100644 --- a/base/src/base/env/platform_env.h +++ b/base/src/base/env/platform_env.h @@ -148,9 +148,9 @@ class Genode::Platform_env : public Genode::Env, public Emergency_ram_reserve void release() { - PDBG("used before freeing emergency=%zd", _resources.ram.used()); + PDBG("used before freeing emergency=%zu", _resources.ram.used()); _resources.ram.free(_emergency_ram_ds); - PDBG("used after freeing emergency=%zd", _resources.ram.used()); + PDBG("used after freeing emergency=%zu", _resources.ram.used()); } diff --git a/base/src/base/env/platform_env_common.h b/base/src/base/env/platform_env_common.h index 3277f1739..e0257f51f 100644 --- a/base/src/base/env/platform_env_common.h +++ b/base/src/base/env/platform_env_common.h @@ -71,11 +71,11 @@ struct Upgradeable_client : CLIENT void upgrade_ram(Genode::size_t quota) { - PINF("upgrading quota donation for Env::%s (%zd bytes)", + PINF("upgrading quota donation for Env::%s (%zu bytes)", CLIENT::Rpc_interface::service_name(), quota); char buf[128]; - Genode::snprintf(buf, sizeof(buf), "ram_quota=%zd", quota); + Genode::snprintf(buf, sizeof(buf), "ram_quota=%zu", quota); Genode::env()->parent()->upgrade(_cap, buf); } @@ -118,7 +118,7 @@ struct Genode::Expanding_ram_session_client : Upgradeable_clientparent()->resource_request(buf); }, @@ -141,7 +141,7 @@ struct Genode::Expanding_ram_session_client : Upgradeable_clientparent()->resource_request(buf); } return ret; @@ -229,7 +229,7 @@ class Genode::Expanding_parent_client : public Parent_client .ulong_value(0); char buf[128]; - snprintf(buf, sizeof(buf), "ram_quota=%zd", ram_quota); + snprintf(buf, sizeof(buf), "ram_quota=%zu", ram_quota); resource_request(Resource_args(buf)); }, diff --git a/base/src/base/heap/sliced_heap.cc b/base/src/base/heap/sliced_heap.cc index 2c2863aef..649cce2aa 100644 --- a/base/src/base/heap/sliced_heap.cc +++ b/base/src/base/heap/sliced_heap.cc @@ -84,7 +84,7 @@ bool Sliced_heap::alloc(size_t size, void **out_addr) _ram_session->free(ds_cap); return false; } catch (Ram_session::Alloc_failed) { - PERR("Could not allocate dataspace with size %zd", size); + PERR("Could not allocate dataspace with size %zu", size); return false; } diff --git a/base/src/core/core_mem_alloc.cc b/base/src/core/core_mem_alloc.cc index 031689ea9..ea8f7f3c6 100644 --- a/base/src/core/core_mem_alloc.cc +++ b/base/src/core/core_mem_alloc.cc @@ -35,13 +35,13 @@ bool Core_mem_allocator::Mapped_mem_allocator::alloc(size_t size, void **out_add /* allocate physical pages */ if (!_phys_alloc->alloc(page_rounded_size, &phys_addr)) { - PERR("Could not allocate physical memory region of size %zd\n", page_rounded_size); + PERR("Could not allocate physical memory region of size %zu\n", page_rounded_size); return false; } /* allocate range in core's virtual address space */ if (!_virt_alloc->alloc(page_rounded_size, &virt_addr)) { - PERR("Could not allocate virtual address range in core of size %zd\n", page_rounded_size); + PERR("Could not allocate virtual address range in core of size %zu\n", page_rounded_size); /* revert physical allocation */ _phys_alloc->free(phys_addr); @@ -49,7 +49,7 @@ bool Core_mem_allocator::Mapped_mem_allocator::alloc(size_t size, void **out_add } if (verbose_core_mem_alloc) - printf("added core memory block of %zd bytes at virt=%p phys=%p\n", + printf("added core memory block of %zu bytes at virt=%p phys=%p\n", page_rounded_size, virt_addr, phys_addr); /* make physical page accessible at the designated virtual address */ diff --git a/base/src/core/include/irq_root.h b/base/src/core/include/irq_root.h index c75ddaea0..794e9a838 100644 --- a/base/src/core/include/irq_root.h +++ b/base/src/core/include/irq_root.h @@ -68,7 +68,7 @@ namespace Genode { long remaining_ram_quota = ram_quota - sizeof(Irq_session_component) - _md_alloc->overhead(sizeof(Irq_session_component)); if (remaining_ram_quota < 0) { - PERR("Insufficient ram quota, provided=%zd, required=%zd", + PERR("Insufficient ram quota, provided=%zu, required=%zu", ram_quota, sizeof(Irq_session_component) + _md_alloc->overhead(sizeof(Irq_session_component))); return Session_capability(); diff --git a/base/src/core/main.cc b/base/src/core/main.cc index 3b4934bc9..d2f6fe9c0 100644 --- a/base/src/core/main.cc +++ b/base/src/core/main.cc @@ -269,7 +269,7 @@ int main() core's heap and not accounted by the component's meta data allocator */ Genode::size_t init_quota = platform()->ram_alloc()->avail() - 172*1024; env()->ram_session()->transfer_quota(init_ram_session_cap, init_quota); - PDBG("transferred %zd MB to init", init_quota / (1024*1024)); + PDBG("transferred %zu MB to init", init_quota / (1024*1024)); Core_child *init = new (env()->heap()) Core_child(Rom_session_client(init_rom_session_cap).dataspace(), diff --git a/base/src/core/ram_session_component.cc b/base/src/core/ram_session_component.cc index 342b42822..58c1173de 100644 --- a/base/src/core/ram_session_component.cc +++ b/base/src/core/ram_session_component.cc @@ -71,7 +71,7 @@ int Ram_session_component::_transfer_quota(Ram_session_component *dst, size_t am /* decrease quota limit of this session - check against used quota */ if (_quota_limit < amount + _payload) { PWRN("Insufficient quota for transfer: %s", _label); - PWRN(" have %zd, need %zd", _quota_limit - _payload, amount); + PWRN(" have %zu, need %zu", _quota_limit - _payload, amount); return -3; } @@ -124,11 +124,11 @@ Ram_dataspace_capability Ram_session_component::alloc(size_t ds_size, bool cache if (used_quota() + SBS + ds_size > _quota_limit) { PWRN("Quota exceeded: %s", _label); - PWRN(" memory for slab: %zd", _ds_slab.consumed()); - PWRN(" used quota: %zd", used_quota()); - PWRN(" ds_size: %zd", ds_size); - PWRN(" sizeof(Ram_session_component): %zd", sizeof(Ram_session_component)); - PWRN(" quota_limit: %zd", _quota_limit); + PWRN(" memory for slab: %zu", _ds_slab.consumed()); + PWRN(" used quota: %zu", used_quota()); + PWRN(" ds_size: %zu", ds_size); + PWRN(" sizeof(Ram_session_component): %zu", sizeof(Ram_session_component)); + PWRN(" quota_limit: %zu", _quota_limit); throw Quota_exceeded(); } @@ -157,7 +157,7 @@ Ram_dataspace_capability Ram_session_component::alloc(size_t ds_size, bool cache * fragmentation could cause a failing allocation. */ if (!alloc_succeeded) { - PERR("We ran out of physical memory while allocating %zd bytes", ds_size); + PERR("We ran out of physical memory while allocating %zu bytes", ds_size); throw Quota_exceeded(); } @@ -183,7 +183,7 @@ Ram_dataspace_capability Ram_session_component::alloc(size_t ds_size, bool cache _clear_ds(ds); if (verbose) - PDBG("ds_size=%zd, used_quota=%zd quota_limit=%zd", + PDBG("ds_size=%zu, used_quota=%zu quota_limit=%zu", ds_size, used_quota(), _quota_limit); Dataspace_capability result = _ds_ep->manage(ds); @@ -234,7 +234,7 @@ int Ram_session_component::transfer_quota(Ram_session_capability ram_session_cap size_t amount) { if (verbose) - PDBG("amount=%zd", amount); + PDBG("amount=%zu", amount); Object_pool::Guard dst(_ram_session_ep->lookup_and_lock(ram_session_cap)); return _transfer_quota(dst, amount); @@ -263,7 +263,7 @@ Ram_session_component::~Ram_session_component() for (Dataspace_component *ds; (ds = _ds_slab.raw()->first_object()); _free_ds(ds)); if (_payload != 0) - PWRN("Remaining payload of %zd in ram session to destroy", _payload); + PWRN("Remaining payload of %zu in ram session to destroy", _payload); if (!_ref_account) return; diff --git a/os/include/init/child.h b/os/include/init/child.h index 68b7d8586..7f091138f 100644 --- a/os/include/init/child.h +++ b/os/include/init/child.h @@ -119,7 +119,7 @@ namespace Init { ram_quota = avail_slack_ram_quota(); if (config_verbose) Genode::printf("Warning: Specified quota exceeds available quota.\n" - " Proceeding with a quota of %zd bytes.\n", + " Proceeding with a quota of %zu bytes.\n", (Genode::size_t)ram_quota); } return ram_quota; @@ -531,7 +531,7 @@ namespace Init { if (config_verbose) { Genode::printf("child \"%s\"\n", _name.unique); - Genode::printf(" RAM quota: %zd\n", _resources.ram_quota); + Genode::printf(" RAM quota: %zu\n", _resources.ram_quota); Genode::printf(" ELF binary: %s\n", _name.file); Genode::printf(" priority: %ld\n", _resources.priority); }