test/dummy_libs/core_mem/mem.dummy.cpp
// Allocate pages of RAM. Some of the kernel code relies on the assumption that
// the returned address is aligned on page boundaries so use memalign for that.

Allocate pages of RAM. Some of the kernel code relies on the assumption that
the returned address is aligned on page boundaries so use memalign for that.
Allocate pages of RAM . Some of the kernel code relies on the assumption that the returned address is aligned on page boundaries so use memalign for that .
void *mem_allocate_pages(uint32_t num_pages)
{
  uint64_t requested_ram = num_pages * page_size;
#ifdef _MSVC_LANG
  return _aligned_malloc(requested_ram, page_size);
#else
  return memalign(page_size, requested_ram);
#endif
}
void * mem_allocate_pages ( uint32_t num_pages ) { uint64_t requested_ram = num_pages * page_size ; #ifdef _MSVC_LANG return _aligned_malloc ( requested_ram , page_size ) ; #else return memalign ( page_size , requested_ram ) ; #endif }
Allocate pages of RAM.
Allocate pages of RAM .