Lines Matching refs:bytes
55 inline void* mmapTHP(size_t bytes) { in mmapTHP() argument
61 hint = hint ? (void*)((uintptr_t)hint - bytes) : hint; in mmapTHP()
62 void* result = mmap_impl(bytes, hint); in mmapTHP()
74 munmap(result, bytes); in mmapTHP()
77 result = mmap_impl(bytes + HUGE_PAGE_SIZE); in mmapTHP()
98 munmap((void*)((uintptr_t)result + bytes), HUGE_PAGE_SIZE - offset); in mmapTHP()
114 void* MapMemory (size_t bytes, PageType pageType) in MapMemory() argument
122 result = mmap_impl(bytes); in MapMemory()
127 …MALLOC_ASSERT((bytes % HUGE_PAGE_SIZE) == 0, "Mapping size should be divisible by huge page size"); in MapMemory()
128 result = mmap_impl(bytes, nullptr, __TBB_MAP_HUGETLB); in MapMemory()
133 …MALLOC_ASSERT((bytes % HUGE_PAGE_SIZE) == 0, "Mapping size should be divisible by huge page size"); in MapMemory()
134 result = mmapTHP(bytes); in MapMemory()
151 int UnmapMemory(void *area, size_t bytes) in UnmapMemory() argument
154 int ret = munmap(area, bytes); in UnmapMemory()
164 void* MapMemory (size_t bytes, PageType) in MapMemory() argument
167 return VirtualAlloc(nullptr, bytes, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); in MapMemory()
178 void *ErrnoPreservingMalloc(size_t bytes) in ErrnoPreservingMalloc() argument
181 void *ret = malloc( bytes ); in ErrnoPreservingMalloc()
188 void* MapMemory (size_t bytes, PageType) in MapMemory() argument
190 return ErrnoPreservingMalloc( bytes ); in MapMemory()