kernel/vm: Always use uint64 for memory amounts.
We want to be able to support more than 4GB of swap even on 32-bit. Change-Id: I52c3aa8c0b77bbbd60a9b9ac37a4a7ad254aa201 Reviewed-on: https://review.haiku-os.org/c/haiku/+/11335 Reviewed-by: waddlesplash <[email protected]> (cherry picked from commit e4c6bf453d4be138dbc8dd81a687c548cec6afdc) Reviewed-on: https://review.haiku-os.org/c/haiku/+/11336
This commit is contained in:
committed by
waddlesplash
parent
cdcafe6d13
commit
edc2131db9
@@ -42,11 +42,11 @@ status_t vm_map_cache(VMAddressSpace* addressSpace,
|
||||
status_t vm_unmap_address_range(VMAddressSpace* addressSpace,
|
||||
addr_t address, addr_t size, bool kernel);
|
||||
|
||||
void vm_unreserve_memory(size_t bytes);
|
||||
status_t vm_try_reserve_memory(size_t bytes, int priority, bigtime_t timeout);
|
||||
void vm_unreserve_memory(uint64 bytes);
|
||||
status_t vm_try_reserve_memory(uint64 bytes, int priority, bigtime_t timeout);
|
||||
|
||||
void vm_unreserve_memory_or_swap(size_t bytes);
|
||||
status_t vm_try_reserve_memory_or_swap(size_t bytes, int priority, bigtime_t timeout);
|
||||
void vm_unreserve_memory_or_swap(uint64 bytes);
|
||||
status_t vm_try_reserve_memory_or_swap(uint64 bytes, int priority, bigtime_t timeout);
|
||||
|
||||
void vm_debug_init();
|
||||
void vm_kernel_args_init_post_area(kernel_args* args);
|
||||
|
||||
@@ -4401,7 +4401,7 @@ vm_kernel_address_space_left(void)
|
||||
|
||||
|
||||
void
|
||||
vm_unreserve_memory(size_t amount)
|
||||
vm_unreserve_memory(uint64 amount)
|
||||
{
|
||||
ASSERT((amount % B_PAGE_SIZE) == 0);
|
||||
|
||||
@@ -4418,7 +4418,7 @@ vm_unreserve_memory(size_t amount)
|
||||
|
||||
#if ENABLE_SWAP_SUPPORT
|
||||
void
|
||||
vm_unreserve_memory_or_swap(size_t amount)
|
||||
vm_unreserve_memory_or_swap(uint64 amount)
|
||||
{
|
||||
ASSERT((amount % B_PAGE_SIZE) == 0);
|
||||
|
||||
@@ -4489,7 +4489,7 @@ vm_try_reserve_internal(int64& pool, uint32 resource,
|
||||
|
||||
|
||||
status_t
|
||||
vm_try_reserve_memory(size_t amount, int priority, bigtime_t timeout)
|
||||
vm_try_reserve_memory(uint64 amount, int priority, bigtime_t timeout)
|
||||
{
|
||||
timeout += system_time();
|
||||
|
||||
@@ -4515,7 +4515,7 @@ vm_try_reserve_memory(size_t amount, int priority, bigtime_t timeout)
|
||||
|
||||
#if ENABLE_SWAP_SUPPORT
|
||||
status_t
|
||||
vm_try_reserve_memory_or_swap(size_t amount, int priority, bigtime_t timeout)
|
||||
vm_try_reserve_memory_or_swap(uint64 amount, int priority, bigtime_t timeout)
|
||||
{
|
||||
timeout += system_time();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user