forked from CosmosOS/Cosmos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Heap.cs
32 lines (28 loc) · 839 Bytes
/
Heap.cs
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.IL2CPU {
partial class RuntimeEngine {
public static uint HeapHandle = 0;
public const uint InitialHeapSize = 4096;
public const uint MaximumHeapSize = 10 * 1024 * InitialHeapSize; // 10 megabytes
public static void Heap_Initialize() {
//HeapHandle = PInvokes.Kernel32_HeapCreate(0, InitialHeapSize, MaximumHeapSize);
}
public static uint Heap_AllocNewObject(uint aSize) {
// if (aSize == 0) {
// aSize = 1;
// }
//return PInvokes.Kernel32_HeapAlloc(HeapHandle, 0x00000008, aSize);
return 0;
}
public static void Heap_Free(uint aObject) {
//
}
public static void Heap_Shutdown() {
//PInvokes.Kernel32_HeapDestroy(HeapHandle);
//HeapHandle = 0;
}
}
}