Files
tp/include/revolution/mem/heapCommon.h
T
TakaRikka 8185d87f85 copy homebuttonLib from oot-vc (#2960)
* initial copy of hbm from sdk_2009-12-11

* some more nw4hbm cleanup

* nw4hbm db mostly done

* nw4hbm snd copied from oot-vc

* nw4hbm ut copied

* nw4hbm lyt copied

* nw4hbm copied, mostly matching usa 1.0

* setup nw4hbm debug define

* fix HBMDataInfo struct

* add rvl sdk card lib
2025-12-16 16:55:07 +02:00

44 lines
721 B
C

#ifndef _REVOLUTION_MEM_HEAPCOMMON_H_
#define _REVOLUTION_MEM_HEAPCOMMON_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <revolution/mem/list.h>
#include <revolution/os.h>
typedef struct MEMiHeapHead MEMiHeapHead;
struct MEMiHeapHead {
u32 signature;
MEMLink link;
MEMList childList;
void* heapStart;
void* heapEnd;
OSMutex mutex;
union {
u32 val;
struct {
u32 reserved : 24;
u32 optFlag : 8;
} fields;
} attribute;
};
typedef MEMiHeapHead* MEMHeapHandle;
typedef u32 UIntPtr;
static inline UIntPtr GetUIntPtr(const void* ptr) {
return (UIntPtr)(ptr);
}
#ifdef __cplusplus
}
#endif
#endif // _REVOLUTION_MEM_HEAPCOMMON_H_