gwnavruntime/basesystem/systemalloc.h Source File

systemalloc.h
Go to the documentation of this file.
1 /*
2 * Copyright 2016 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 #pragma once
8 
10 
11 namespace Kaim {
12 
17 class MemAlloc
18 {
19 public:
20  static void* Alloc(UPInt size);
21  static void* Realloc(void* ptr, UPInt size);
22  static void Free(void* ptr);
23 };
24 
31 class PageAlloc
32 {
33 public:
34  static void* Alloc(UPInt size, UPInt align);
35  static void* Realloc(void* oldPtr, UPInt oldSize, UPInt newSize, UPInt align);
36  static void Free(void* ptr, UPInt size, UPInt align);
37 };
38 
39 
40 }
41 
Multi-platform abstraction of malloc/free/realloc used to allocate "root objects" memory such as size...
Definition: systemalloc.h:17
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
Multi-platform abstraction of aligned malloc/free/realloc windows (_aligned_malloc, _aligned_free, _aligned_realloc), posix (memalign, reallocalign, free), or handmade alignment used by derivations of SysAlloc Note that this is called with for 4096 byte "page" allocations to group smaller allocations <= 512="" bytes="" but="" also="" directly="" for="" allocations=""> 512 bytes So the name PageAlloc is not totally relevant, but the interface has enough information to take advantage of platform specific page allocations.
Definition: systemalloc.h:31