aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server
diff options
context:
space:
mode:
authordaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
committerdaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
commitb691c43c44ff180d10e7d4a9afc83b98551ff586 (patch)
tree3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/PS3/PS3Extras/HeapInspector/Server
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.Client/PS3/PS3Extras/HeapInspector/Server')
-rw-r--r--Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInfo.h23
-rw-r--r--Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInspectorServer.h33
-rw-r--r--Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInspectorServerTypes.h32
-rw-r--r--Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Debug_RTTI/libHeapInspectorServer.abin0 -> 388974 bytes
-rw-r--r--Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Debug_RTTI_EH/libHeapInspectorServer.abin0 -> 401662 bytes
-rw-r--r--Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/HeapHooks.hpp63
-rw-r--r--Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Release_RTTI/libHeapInspectorServer.abin0 -> 77700 bytes
-rw-r--r--Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Release_RTTI_EH/libHeapInspectorServer.abin0 -> 81690 bytes
8 files changed, 151 insertions, 0 deletions
diff --git a/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInfo.h b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInfo.h
new file mode 100644
index 00000000..885c8da5
--- /dev/null
+++ b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInfo.h
@@ -0,0 +1,23 @@
+#ifndef _HEAPINSPECTORSERVER_HEAPINFO_H_
+#define _HEAPINSPECTORSERVER_HEAPINFO_H_
+
+#include "HeapInspectorServerTypes.h"
+#include <string>
+
+BEGIN_NAMESPACE(HeapInspectorServer)
+
+struct Range
+{
+ uint32 m_Min;
+ uint32 m_Max;
+};
+
+struct HeapInfo
+{
+ std::string m_Description;
+ Range m_Range;
+};
+
+END_NAMESPACE(HeapInspectorServer)
+
+#endif // _HEAPINSPECTORSERVER_HEAPINFO_H_ \ No newline at end of file
diff --git a/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInspectorServer.h b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInspectorServer.h
new file mode 100644
index 00000000..974bdae9
--- /dev/null
+++ b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInspectorServer.h
@@ -0,0 +1,33 @@
+#ifndef _HEAPINSPECTORSERVER_PLATFORMINTERFACES_HEAPINSPECTORSERVER_H_
+#define _HEAPINSPECTORSERVER_PLATFORMINTERFACES_HEAPINSPECTORSERVER_H_
+
+#include "HeapInfo.h"
+#include <vector>
+
+BEGIN_NAMESPACE(HeapInspectorServer)
+
+enum EWaitForConnection
+{
+ WaitForConnection_Disabled,
+ WaitForConnection_Enabled
+};
+
+std::vector<HeapInfo> GetDefaultHeapInfo();
+bool Initialise(const std::vector<HeapInfo>& a_HeapInfo, int a_Port, EWaitForConnection a_WaitForConnection);
+bool IsInitialised();
+void Shutdown();
+
+typedef int Mutation;
+
+Mutation BeginAlloc();
+void EndAlloc(Mutation a_Mutation, uint16 a_HeapID, void* a_Address, uint32 a_SizeRequested, uint32 a_SizeReceived);
+
+Mutation BeginReAlloc();
+void EndReAlloc(Mutation a_Mutation, uint16 a_HeapID, void* a_OldAddress, void* a_NewAddress, uint32 a_SizeRequested, uint32 a_SizeReceived);
+
+Mutation BeginFree();
+void EndFree(Mutation a_Mutation, uint16 a_HeapID, void* a_Address);
+
+END_NAMESPACE(HeapInspectorServer)
+
+#endif // _HEAPINSPECTORSERVER_PLATFORMINTERFACES_HEAPINSPECTORSERVER_H_ \ No newline at end of file
diff --git a/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInspectorServerTypes.h b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInspectorServerTypes.h
new file mode 100644
index 00000000..134059db
--- /dev/null
+++ b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInspectorServerTypes.h
@@ -0,0 +1,32 @@
+#ifndef _HEAPINSPECTORSERVER_TYPES_H_
+#define _HEAPINSPECTORSERVER_TYPES_H_
+
+#define BEGIN_NAMESPACE(x) namespace x {
+#define END_NAMESPACE(x) }
+#define BEGIN_UNNAMED_NAMESPACE() namespace {
+#define END_UNNAMED_NAMESPACE() }
+
+BEGIN_NAMESPACE(HeapInspectorServer)
+
+typedef unsigned char uint8;
+typedef unsigned short uint16;
+typedef unsigned int uint32;
+
+#if HEAPINSPECTOR_PS3
+ typedef unsigned long long uint64;
+ typedef long long int64;
+#else
+ typedef unsigned __int64 uint64;
+ typedef __int64 int64;
+#endif
+
+typedef char int8;
+typedef short int16;
+typedef int int32;
+
+typedef char char8;
+typedef wchar_t char16;
+
+END_NAMESPACE(HeapInspectorServer)
+
+#endif //_HEAPINSPECTORSERVER_TYPES_H_
diff --git a/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Debug_RTTI/libHeapInspectorServer.a b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Debug_RTTI/libHeapInspectorServer.a
new file mode 100644
index 00000000..9706504b
--- /dev/null
+++ b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Debug_RTTI/libHeapInspectorServer.a
Binary files differ
diff --git a/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Debug_RTTI_EH/libHeapInspectorServer.a b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Debug_RTTI_EH/libHeapInspectorServer.a
new file mode 100644
index 00000000..5394d7ab
--- /dev/null
+++ b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Debug_RTTI_EH/libHeapInspectorServer.a
Binary files differ
diff --git a/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/HeapHooks.hpp b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/HeapHooks.hpp
new file mode 100644
index 00000000..f6e7c64a
--- /dev/null
+++ b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/HeapHooks.hpp
@@ -0,0 +1,63 @@
+#ifndef _HEAPINSPECTORSERVER_PS3_HEAPHOOKS_HPP_
+#define _HEAPINSPECTORSERVER_PS3_HEAPHOOKS_HPP_
+
+#include <stdlib.h>
+extern "C" void* __real_memalign(size_t a_Boundary, size_t a_Size);
+extern "C" void* __wrap_memalign(size_t a_Boundary, size_t a_Size)
+{
+ HeapInspectorServer::Mutation mutation = HeapInspectorServer::BeginAlloc();
+ void* result = __real_memalign(a_Boundary, a_Size);
+ size_t usableSize = malloc_usable_size(result);
+ HeapInspectorServer::EndAlloc(mutation, 0, result, a_Size, usableSize);
+ return result;
+}
+
+extern "C" void* __real_calloc(size_t a_NumElements, size_t a_SizePerElement);
+extern "C" void* __wrap_calloc(size_t a_NumElements, size_t a_SizePerElement)
+{
+ HeapInspectorServer::Mutation mutation = HeapInspectorServer::BeginAlloc();
+ void* result = __real_calloc(a_NumElements, a_SizePerElement);
+ size_t usableSize = malloc_usable_size(result);
+ HeapInspectorServer::EndAlloc(mutation, 0, result, a_NumElements * a_SizePerElement, usableSize);
+ return result;
+}
+
+extern "C" void* __real_malloc(size_t a_Size);
+extern "C" void* __wrap_malloc(size_t a_Size)
+{
+ HeapInspectorServer::Mutation mutation = HeapInspectorServer::BeginAlloc();
+ void* result = __real_malloc(a_Size);
+ size_t usableSize = malloc_usable_size(result);
+ HeapInspectorServer::EndAlloc(mutation, 0, result, a_Size, usableSize);
+ return result;
+}
+
+extern "C" void __real_free(void* a_Address);
+extern "C" void __wrap_free(void* a_Address)
+{
+ HeapInspectorServer::Mutation mutation = HeapInspectorServer::BeginFree();
+ __real_free(a_Address);
+ HeapInspectorServer::EndFree(mutation, 0, a_Address);
+}
+
+extern "C" void *__real_realloc(void *a_Address, size_t a_Size);
+extern "C" void *__wrap_realloc(void *a_Address, size_t a_Size)
+{
+ HeapInspectorServer::Mutation mutation = HeapInspectorServer::BeginReAlloc();
+ void* result = __real_realloc(a_Address, a_Size);
+ size_t usableSize = malloc_usable_size(result);
+ HeapInspectorServer::EndReAlloc(mutation, 0, a_Address, result, a_Size, usableSize);
+ return result;
+}
+
+extern "C" void* __real_reallocalign(void *a_Address, size_t a_Size, size_t a_Boundary);
+extern "C" void* __wrap_reallocalign(void *a_Address, size_t a_Size, size_t a_Boundary)
+{
+ HeapInspectorServer::Mutation mutation = HeapInspectorServer::BeginReAlloc();
+ void* result = __real_reallocalign(a_Address, a_Size, a_Boundary);
+ size_t usableSize = malloc_usable_size(result);
+ HeapInspectorServer::EndReAlloc(mutation, 0, a_Address, result, a_Size, usableSize);
+ return result;
+}
+
+#endif //_HEAPINSPECTORSERVER_PS3_HEAPHOOKS_HPP_ \ No newline at end of file
diff --git a/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Release_RTTI/libHeapInspectorServer.a b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Release_RTTI/libHeapInspectorServer.a
new file mode 100644
index 00000000..2ffce239
--- /dev/null
+++ b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Release_RTTI/libHeapInspectorServer.a
Binary files differ
diff --git a/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Release_RTTI_EH/libHeapInspectorServer.a b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Release_RTTI_EH/libHeapInspectorServer.a
new file mode 100644
index 00000000..67f36f2e
--- /dev/null
+++ b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/PS3/Release_RTTI_EH/libHeapInspectorServer.a
Binary files differ