Started working on a custom profiler

This commit is contained in:
Victor Olin 2023-02-28 18:44:07 +01:00
parent 4f9aaaf8b4
commit 137687e446
8 changed files with 158 additions and 28 deletions

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.h_test.out</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View file

@ -0,0 +1,41 @@
#include <iostream>
#include "heap.hpp"
using namespace std;
struct Node {
int value;
Node *left;
Node *right;
};
int getValue();
Node *createNode();
void insert();
int main() {
GC::Heap::init();
Node *node = static_cast<Node *>(GC::Heap::alloc(sizeof(Node)));
return 0;
}
int getValue() {
cout << "Enter a value to insert: ";
int value;
cin >> value;
return value;
}
Node *createNode() {
Node *node = static_cast<Node *>(GC::Heap::alloc(sizeof(Node)));
node->value = getValue();
return node;
}
void insert(Node *root) {
Node *node = createNode();
Node *curr = root;
while (curr)
}