| 46 | Allocations allocations[MAX_ALLOCATIONS] = {NULL, 0}; |
| 47 | |
| 48 | const char* OgMallocTypeString(uint8_t type) { |
| 49 | switch (type) { |
| 50 | case OG_MALLOC_GEN: |
| 51 | return "Generic"; |
| 52 | case OG_MALLOC_NEW: |
| 53 | return "new"; |
| 54 | case OG_MALLOC_NEW_ARR: |
| 55 | return "new []"; |
| 56 | case OG_MALLOC_RC: |
| 57 | return "Recast"; |
| 58 | case OG_MALLOC_DT: |
| 59 | return "Detour"; |
| 60 | default: |
| 61 | return "Unknown"; |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | void* og_malloc(size_t size, uint8_t source_id) { |
| 66 | if (source_id >= OG_MALLOC_TYPE_COUNT) { |