blob: 48df282a8b93d70b837403863db3a9bd74db0e05 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 | #ifndef GUARD_NNS_FND_ALLOCATOR_H
#define GUARD_NNS_FND_ALLOCATOR_H
#include "NNS_FND_heapcommon.h"
typedef struct NNSFndAllocator NNSFndAllocator;
typedef void*   (*NNSFndFuncAllocatorAlloc)(
    NNSFndAllocator*    pAllocator,
    u32                 size);
typedef void    (*NNSFndFuncAllocatorFree)(
    NNSFndAllocator*    pAllocator,
    void*               memBlock);
typedef struct NNSFndAllocatorFunc NNSFndAllocatorFunc;
struct NNSFndAllocatorFunc
{
    NNSFndFuncAllocatorAlloc    pfAlloc;
    NNSFndFuncAllocatorFree     pfFree;
};
struct NNSFndAllocator
{
    NNSFndAllocatorFunc const * pFunc;
    void*                       pHeap;
    u32                         heapParam1;
    u32                         heapParam2;
};
void NNS_FndInitAllocatorForExpHeap(NNSFndAllocator * pAllocator, NNSFndHeapHandle heap, int alignment);
#endif //GUARD_NNS_FND_ALLOCATOR_H
 |