mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 01:07:57 +00:00
hv: replace CPU_PAGE_SIZE with PAGE_SIZE
replace CPU_PAGE_SIZE with PAGE_SIZE These two MACROs are duplicated and PAGE_SIZE is a more reasonable name. Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -210,15 +210,15 @@ static void deallocate_mem(struct mem_pool *pool, const void *ptr)
|
||||
}
|
||||
|
||||
/*
|
||||
* The return address will be CPU_PAGE_SIZE aligned if 'num_bytes' is greater
|
||||
* than CPU_PAGE_SIZE.
|
||||
* The return address will be PAGE_SIZE aligned if 'num_bytes' is greater
|
||||
* than PAGE_SIZE.
|
||||
*/
|
||||
void *malloc(unsigned int num_bytes)
|
||||
{
|
||||
void *memory = NULL;
|
||||
|
||||
/* Check if bytes requested extend page-size */
|
||||
if (num_bytes < CPU_PAGE_SIZE) {
|
||||
if (num_bytes < PAGE_SIZE) {
|
||||
/*
|
||||
* Request memory allocation from smaller segmented memory pool
|
||||
*/
|
||||
|
Reference in New Issue
Block a user