UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MemPro.h
Go to the documentation of this file.
1/*
2Copyright 2019 PureDev Software Limited
3
4Permission to use, copy, modify, and/or distribute this software for any
5purpose with or without fee is hereby granted, provided that the above
6copyright notice and this permission notice appear in all copies.
7
8THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
17
18//------------------------------------------------------------------------
19//
20// MemPro.h
21//
22/*
23 MemProLib is the library that allows the MemPro application to communicate
24 with your application.
25
26 ===========================================================
27 SETUP
28 ===========================================================
29
30 * include MemPro.cpp and MemPro.h in your project.
31
32 * Link with Dbghelp.lib and Ws2_32.lib - these are needed for the callstack trace and the network connection
33
34 * Connect to your app with the MemPro
35*/
36//------------------------------------------------------------------------
37/*
38 MemPro
39 Version: 1.6.3.0
40*/
41//------------------------------------------------------------------------
42#ifndef MEMPRO_MEMPRO_H_INCLUDED
43#define MEMPRO_MEMPRO_H_INCLUDED
44
45//------------------------------------------------------------------------
46//@EPIC BEGIN - enabled in build config not here
47#if !defined(__UNREAL__)
48 #define MEMPRO_ENABLED 1 // **** enable/disable MemPro here! ****
49#elif !defined(MEMPRO_ENABLED)
50 #define MEMPRO_ENABLED 0
51#endif
52//@EPIC END
53
54//------------------------------------------------------------------------
55#if defined(__UNREAL__) && MEMPRO_ENABLED && !defined(WITH_ENGINE)
56 #undef MEMPRO_ENABLED
57 #define MEMPRO_ENABLED 0
58#endif
59
60//------------------------------------------------------------------------
61#if defined(__UNREAL__)
62 #include "CoreTypes.h"
63 #include "HAL/PlatformMisc.h"
64#endif
65
66//------------------------------------------------------------------------
67// **** The Target Platform ****
68
69// define ONE of these
70//@EPIC BEGIN external definition of platforms
71#if defined(MEMPRO_PLATFORM_XBOXONE)
72#elif defined(MEMPRO_PLATFORM_PS4)
73#elif defined(MEMPRO_PLATFORM_EXTENSION)
74#elif defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64) || defined(__WIN32__)
75//@EPIC END
76 #if defined(_XBOX_ONE)
77 #define MEMPRO_PLATFORM_XBOXONE
78 #elif defined(_XBOX)
79 #define MEMPRO_PLATFORM_XBOX360
80 #else
81 #define MEMPRO_PLATFORM_WIN
82 #endif
83#elif defined(__APPLE__)
84 #define MEMPRO_PLATFORM_APPLE
85#else
86 #define MEMPRO_PLATFORM_UNIX
87#endif
88
89//------------------------------------------------------------------------
90// macros for tracking allocs that define to nothing if disabled
91#if MEMPRO_ENABLED
92 #ifndef WAIT_FOR_CONNECT
93 #define WAIT_FOR_CONNECT false
94 #endif
95 #define MEMPRO_TRACK_ALLOC(p, size) MemPro::TrackAlloc(p, size, WAIT_FOR_CONNECT)
96 #define MEMPRO_TRACK_FREE(p) MemPro::TrackFree(p, WAIT_FOR_CONNECT)
97#else
98 #define MEMPRO_TRACK_ALLOC(p, size) ((void)0)
99 #define MEMPRO_TRACK_FREE(p) ((void)0)
100#endif
101
102//------------------------------------------------------------------------
103#if MEMPRO_ENABLED
104
105//------------------------------------------------------------------------
106// Some platforms have problems initialising winsock from global constructors,
107// to help get around this problem MemPro waits this amount of time before
108// initialising. Allocs and freed that happen during this time are stored in
109// a temporary buffer.
110#define MEMPRO_INIT_DELAY 100
111
112//------------------------------------------------------------------------
113// MemPro waits this long before giving up on a connection after initialisation
114#define MEMPRO_CONNECT_TIMEOUT 500
115
116//------------------------------------------------------------------------
117#include <stdlib.h>
118
119//------------------------------------------------------------------------
120//#define MEMPRO_WRITE_DUMP "d:\\temp\\allocs.mempro_dump"
121
122//------------------------------------------------------------------------
123// always default to use dump files for Unreal
124#if defined(__UNREAL__) && !defined(MEMPRO_WRITE_DUMP)
125 #define MEMPRO_WRITE_DUMP
126#endif
127
128//------------------------------------------------------------------------
129#if defined(MEMPRO_WRITE_DUMP) && defined(DISALLOW_WRITE_DUMP)
130 #error
131#endif
132
133//------------------------------------------------------------------------
134#define MEMPRO_ASSERT(b) if(!(b)) Platform::DebugBreak()
135
136//------------------------------------------------------------------------
137namespace MemPro
138{
139 //------------------------------------------------------------------------
140 typedef long long int64;
141 typedef unsigned long long uint64;
142
143 //------------------------------------------------------------------------
151
152 //------------------------------------------------------------------------
160
161 //------------------------------------------------------------------------
168
169 //------------------------------------------------------------------------
170 typedef int(*ThreadMain)(void*);
171
172 //------------------------------------------------------------------------
173 typedef void(*SendPageStateFunction)(void*, size_t, PageState, PageType, unsigned int, bool, int, void*);
174
175 //------------------------------------------------------------------------
176 typedef void(*EnumerateLoadedModulesCallbackFunction)(int64, const char*, void*);
177
178 //------------------------------------------------------------------------
179 // You don't need to call this directly, it is automatically called on the first allocation.
180 // Only call this function if you want to be able to connect to your app before it has allocated any memory.
181 // If wait_for_connect is true this function will block until the external MemPro app has connected,
182 // this is useful to make sure that every single allocation is being tracked.
183 void Initialise(bool wait_for_connect=false);
184
185 void Disconnect(); // kick all current connections, but can accept more
186
187 void Shutdown(); // free all resources, no more connections allowed
188
189 void TrackAlloc(void* p, size_t size, bool wait_for_connect=false);
190
191 void TrackFree(void* p, bool wait_for_connect=false);
192
193 bool IsPaused();
194
195 void SetPaused(bool paused);
196
197 void TakeSnapshot(bool send_memory=false);
198
200
201 // ignore these, for internal use only
202 void IncRef();
203 void DecRef();
204}
205
206//------------------------------------------------------------------------
207#ifndef MEMPRO_WRITE_DUMP
208namespace
209{
210 // if we are using sockets we need to flush the sockets on global teardown
211 // This class is a trick to attempt to get mempro to shutdown after all other
212 // global objects.
213 class MemProGLobalScope
214 {
215 public:
216 MemProGLobalScope() { MemPro::IncRef(); }
218 };
219 static MemProGLobalScope g_MemProGLobalScope;
220}
221#endif
222
223//------------------------------------------------------------------------
224
225//------------------------------------------------------------------------
226//
227// MemProPlatform.hpp
228//
229//------------------------------------------------------------------------
230#if MEMPRO_ENABLED
231
232//------------------------------------------------------------------------
233#if defined(MEMPRO_PLATFORM_WIN)
234
235 #define MEMPRO_WIN_BASED_PLATFORM
236 #define MEMPRO_INTERLOCKED_ALIGN __declspec(align(8))
237 #define MEMPRO_INSTRUCTION_BARRIER
238 #define MEMPRO_ENABLE_WARNING_PRAGMAS
239 #define MEMPRO_PUSH_WARNING_DISABLE __pragma(warning(push))
240 #define MEMPRO_DISABLE_WARNING(w) __pragma(warning(disable : w))
241 #define MEMPRO_POP_WARNING_DISABLE __pragma(warning(pop))
242 #define MEMPRO_FORCEINLINE FORCEINLINE
243 #define ENUMERATE_ALL_MODULES // if you are having problems compiling this on your platform undefine ENUMERATE_ALL_MODULES and it send info for just the main module
244 #define THREAD_LOCAL_STORAGE __declspec(thread)
245 #define MEMPRO_PORT "27016"
246 #define STACK_TRACE_SIZE 128
247 #define MEMPRO_PAGE_SIZE 4096
248 //#define USE_RTLCAPTURESTACKBACKTRACE
249 #define MEMPRO_ALIGN_SUFFIX(n)
250
251 #if defined(_WIN64) || defined(__LP64__) || defined(__x86_64__) || defined(__ppc64__)
252 #define MEMPRO64
253 #endif
254
255 #ifdef MEMPRO64
256 #define MEMPRO_MAX_ADDRESS ULLONG_MAX
257 #else
258 #define MEMPRO_MAX_ADDRESS UINT_MAX
259 #endif
260
261 #ifdef __UNREAL__
263 #endif
264
265 #ifndef MEMPRO_WRITE_DUMP
266 #if defined(UNICODE) && !defined(_UNICODE)
267 #error for unicode builds please define both UNICODE and _UNICODE. See the FAQ for more details.
268 #endif
269 #if defined(AF_IPX) && !defined(_WINSOCK2API_)
270 #error winsock already defined. Please include winsock2.h before including windows.h or use WIN32_LEAN_AND_MEAN. See the FAQ for more info.
271 #endif
272
273 #pragma warning(push)
274 #pragma warning(disable : 4668)
275 #include <winsock2.h>
276 #pragma warning(pop)
277
278 #include <ws2tcpip.h>
279 #ifndef _WIN32_WINNT
280 #define _WIN32_WINNT 0x0501
281 #endif
282 #endif
283
284 #define WINDOWS_LEAN_AND_MEAN
285 #include <windows.h>
286 #include <intrin.h>
287
288 #ifdef ENUMERATE_ALL_MODULES
289 #pragma warning(push)
290 #pragma warning(disable : 4091)
291 #include <Dbghelp.h>
292 #pragma warning(pop)
293 #pragma comment(lib, "Dbghelp.lib")
294 #endif
295
296 #ifdef __UNREAL__
298 #endif
299
300//@EPIC BEGIN: other platforms
301#elif defined(MEMPRO_PLATFORM_EXTENSION) && defined(__UNREAL__)
302
303 #include COMPILED_PLATFORM_HEADER_WITH_PREFIX(MemPro,MemProExt.h)
304
305//@EPIC END
306
307#elif defined(MEMPRO_PLATFORM_XBOXONE)
308
309 #ifdef __UNREAL__
310 #include "MemPro/MemProXboxOne.h"
311 #else
312 #include "MemProXboxOne.hpp" // contact slynch@puredevsoftware.com for this platform
313 #endif
314
315#elif defined(MEMPRO_PLATFORM_XBOX360)
316
317 #include "MemProXbox360.hpp" // contact slynch@puredevsoftware.com for this platform
318
319#elif defined(MEMPRO_PLATFORM_PS4)
320
321 #ifdef __UNREAL__
322 #include "MemPro/MemProPS4.h"
323 #else
324 #include "MemProPS4.hpp" // contact slynch@puredevsoftware.com for this platform
325 #endif
326
327#elif defined(MEMPRO_PLATFORM_UNIX)
328
329 #define MEMPRO_UNIX_BASED_PLATFORM
330 #define MEMPRO_INTERLOCKED_ALIGN
331 #define MEMPRO_INSTRUCTION_BARRIER
332 #define MEMPRO_PUSH_WARNING_DISABLE
333 #define MEMPRO_DISABLE_WARNING(w)
334 #define MEMPRO_POP_WARNING_DISABLE
335 #define MEMPRO_FORCEINLINE inline
336 #define ENUMERATE_ALL_MODULES
337 #define THREAD_LOCAL_STORAGE __thread
338 #define MEMPRO_PORT "27016"
339 #define STACK_TRACE_SIZE 128
340 #define MEMPRO_ALIGN_SUFFIX(n) __attribute__ ((aligned(n)))
341
342 #if defined(__LP64__) || defined(__x86_64__) || defined(__ppc64__)
343 #define MEMPRO64
344 #endif
345
346#elif defined(MEMPRO_PLATFORM_APPLE)
347
348 #define MEMPRO_UNIX_BASED_PLATFORM
349 #define MEMPRO_INTERLOCKED_ALIGN
350 #define MEMPRO_INSTRUCTION_BARRIER
351 #define MEMPRO_PUSH_WARNING_DISABLE
352 #define MEMPRO_DISABLE_WARNING(w)
353 #define MEMPRO_POP_WARNING_DISABLE
354 #define MEMPRO_FORCEINLINE inline
355 #define ENUMERATE_ALL_MODULES
356 #define THREAD_LOCAL_STORAGE __thread
357 #define MEMPRO_PORT "27016"
358 #define STACK_TRACE_SIZE 128
359 #define MEMPRO_ALIGN_SUFFIX(n) __attribute__ ((aligned(n)))
360
361 #if defined(__LP64__) || defined(__x86_64__) || defined(__ppc64__)
362 #define MEMPRO64
363 #endif
364
365 #ifdef OVERRIDE_NEW_DELETE
366 // if you get linker errors about duplicatly defined symbols please add a unexport.txt
367 // file to your build settings
368 // see here: https://developer.apple.com/library/mac/technotes/tn2185/_index.html
369 void* operator new(std::size_t size) throw(std::bad_alloc)
370 {
371 void* p = malloc(size);
372 MEMPRO_TRACK_ALLOC(p, size);
373 return p;
374 }
375
376 void* operator new(std::size_t size, const std::nothrow_t&) throw()
377 {
378 void* p = malloc(size);
379 MEMPRO_TRACK_ALLOC(p, size);
380 return p;
381 }
382
383 void operator delete(void* p) throw()
384 {
386 free(p);
387 }
388
389 void operator delete(void* p, const std::nothrow_t&) throw()
390 {
392 free(p);
393 }
394
395 void* operator new[](std::size_t size) throw(std::bad_alloc)
396 {
397 void* p = malloc(size);
398 MEMPRO_TRACK_ALLOC(p, size);
399 return p;
400 }
401
402 void* operator new[](std::size_t size, const std::nothrow_t&) throw()
403 {
404 void* p = malloc(size);
405 MEMPRO_TRACK_ALLOC(p, size);
406 return p;
407 }
408
409 void operator delete[](void* p) throw()
410 {
412 free(p);
413 }
414
415 void operator delete[](void* p, const std::nothrow_t&) throw()
416 {
418 free(p);
419 }
420 #endif
421
422#else
423
424 #error
425
426#endif
427
428//------------------------------------------------------------------------
429namespace MemPro
430{
431 //------------------------------------------------------------------------
432 namespace Platform
433 {
435
437
439
441
442 //
443
444#ifndef MEMPRO_WRITE_DUMP
446
448
450
452
454
455 bool BindSocket(void* p_os_socket_mem, const char* p_port);
456
458
459 bool SocketSend(void* p_os_socket_mem, void* p_buffer, int size);
460
461 int SocketReceive(void* p_os_socket_mem, void* p_buffer, int size);
462#endif
463 //
464
466 void* p_os_event_mem,
468 bool initial_state,
469 bool auto_reset);
470
472
474
476
478
479 //
480
482
484
486
488
489 //
490
492
494
495 void SwapEndian(unsigned int& value);
496
497 void SwapEndian(uint64& value);
498
500
501 void* Alloc(int size);
502
503 void Free(void* p, int size);
504
506
508
509 void SetThreadName(unsigned int thread_id, const char* p_name);
510
511 void Sleep(int ms);
512
513 void GetStackTrace(void** stack, int& stack_size, unsigned int& hash);
514
516 bool send_memory,
518 void* p_context);
519
520 void GetVirtualMemStats(size_t& reserved, size_t& committed);
521
524 int& age,
525 void* p_guid,
526 int guid_size,
527 char* p_pdb_filename,
529
532 void* p_context);
533
534 void DebugWrite(const char* p_message);
535
537
539
541
542 void MemCpy(void* p_dest, int dest_size, const void* p_source, int source_size);
543
544 void SPrintF(char* p_dest, int dest_size, const char* p_format, const char* p_str);
545
546 //
547
549
551
552 bool OpenFileForWrite(void* p_os_file_mem, const char* p_filename);
553
555
557
558 bool WriteFile(void* p_os_file_mem, const void* p_data, int size);
559
560#ifdef MEMPRO_WRITE_DUMP
561 void GetDumpFilename(char* p_filename, int max_length);
562#endif
563 }
564}
565
566//------------------------------------------------------------------------
567namespace MemPro
568{
569 //------------------------------------------------------------------------
570 namespace GenericPlatform
571 {
573
575
577
579
580#ifndef MEMPRO_WRITE_DUMP
582
584
586
588
590
592
593 bool BindSocket(void* p_os_socket_mem, const char* p_port);
594
596
597 bool SocketSend(void* p_os_socket_mem, void* p_buffer, int size);
598
599 int SocketReceive(void* p_os_socket_mem, void* p_buffer, int size);
600#endif
602 void* p_os_event_mem,
604 bool initial_state,
605 bool auto_reset);
606
608
610
612
614
616
618
620
622
624
626
627 void SwapEndian(unsigned int& value);
628
629 void SwapEndian(uint64& value);
630
632
633 void* Alloc(int size);
634
635 void Free(void* p, int size);
636
637 void SetThreadName(unsigned int thread_id, const char* p_name);
638
639 void Sleep(int ms);
640
642 bool send_memory,
644 void* p_context);
645
646 void GetVirtualMemStats(size_t& reserved, size_t& committed);
647
650 int& age,
651 void* p_guid,
652 int guid_size,
653 char* p_pdb_filename,
655
657
658 void DebugWrite(const char* p_message);
659
660 void MemCpy(void* p_dest, int dest_size, const void* p_source, int source_size);
661
662 void SPrintF(char* p_dest, int dest_size, const char* p_format, const char* p_str);
663
665
667
668 bool OpenFileForWrite(void* p_os_file_mem, const char* p_filename);
669
671
673
674 bool WriteFile(void* p_os_file_mem, const void* p_data, int size);
675
676 #ifdef MEMPRO_WRITE_DUMP
677 void GetDumpFilename(char* p_filename, int max_length);
678 #endif
679 }
680}
681
682//------------------------------------------------------------------------
683#endif // #if MEMPRO_ENABLED
684
685//------------------------------------------------------------------------
686#ifdef OVERRIDE_NEW_DELETE
687
688 #if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64) || defined(__WIN32__) || defined(__WINDOWS__)
689 #include <malloc.h>
690
691 void* operator new(size_t size)
692 {
693 void* p = malloc(size);
694 MEMPRO_TRACK_ALLOC(p, size);
695 return p;
696 }
697
698 void operator delete(void* p)
699 {
701 free(p);
702 }
703
704 void* operator new[](size_t size)
705 {
706 void* p = malloc(size);
707 MEMPRO_TRACK_ALLOC(p, size);
708 return p;
709 }
710
711 void operator delete[](void* p)
712 {
714 free(p);
715 }
716 #endif
717
718#endif
719
720//------------------------------------------------------------------------
721#ifdef OVERRIDE_MALLOC_FREE
722
723 #if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64) || defined(__WIN32__) || defined(__WINDOWS__)
724
725 // NOTE: for this to work, you will need to make sure you are linking STATICALLY to the crt. eg: /MTd
726
727 __declspec(restrict) __declspec(noalias) void* malloc(size_t size)
728 {
729 void* p = HeapAlloc(GetProcessHeap(), 0, size);
730 MEMPRO_TRACK_ALLOC(p, size);
731 return p;
732 }
733
734 __declspec(restrict) __declspec(noalias) void* realloc(void *p, size_t new_size)
735 {
737 void* p_new = HeapReAlloc(GetProcessHeap(), 0, p, new_size);
739 return p_new;
740 }
741
742 __declspec(noalias) void free(void *p)
743 {
744 HeapFree(GetProcessHeap(), 0, p);
746 }
747 #else
748 void *malloc(int size)
749 {
750 void* (*ptr)(int);
751 void* handle = (void*)-1;
752 ptr = (void*)dlsym(handle, "malloc");
753 if(!ptr) abort();
754 void *p = (*ptr)(size);
755 MEMPRO_TRACK_ALLOC(p, size);
756 return p;
757 }
758
759 void *realloc(void *p, int size)
760 {
762 void * (*ptr)(void *, int);
763 void * handle = (void*) -1;
764 ptr = (void*)dlsym(handle, "realloc");
765 if (!ptr) abort();
766 void* p_new = (*ptr)(p, size);
768 return p_new;
769 }
770
771 void free(void *p)
772 {
774 void* (*ptr)(void*);
775 void* handle = (void*)-1;
776 ptr = (void*)dlsym(handle, "free");
777 if (!ptr == NULL) abort();
778 (*ptr)(alloc);
779 }
780 #endif
781#endif
782
783//------------------------------------------------------------------------
784#endif // #if MEMPRO_ENABLED
785
786//------------------------------------------------------------------------
787#endif // #ifndef MEMPRO_MEMPRO_H_INCLUDED
788
OO_U32 reserved[4]
Definition oodle2.h:294
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define NULL
Definition oodle2base.h:134
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define MEMPRO_TRACK_ALLOC(p, size)
Definition MemPro.h:95
#define MEMPRO_TRACK_FREE(p)
Definition MemPro.h:96
const bool
Definition NetworkReplayStreaming.h:178
char * dest
Definition lz4.h:709
__declspec(dllimport) int __stdcall IsDebuggerPresent()
free(DecoderMem)
void GetVirtualMemStats(size_t &reserved, size_t &committed)
int SocketReceive(void *p_os_socket_mem, void *p_buffer, int size)
void DestroyThread(void *p_os_thread_mem)
void DebugWrite(const char *p_message)
void * Alloc(int size)
void SwapEndian(unsigned int &value)
void CloseFile(void *p_os_file_mem)
void SendPageState(bool send_memory, SendPageStateFunction send_page_state_function, void *p_context)
void TakeLock(void *p_os_lock_mem)
bool GetExtraModuleInfo(int64 ModuleBase, int &age, void *p_guid, int guid_size, char *p_pdb_filename, int pdb_filename_size)
bool BindSocket(void *p_os_socket_mem, const char *p_port)
void MemProEnumerateLoadedModules(EnumerateLoadedModulesCallbackFunction p_callback_function, void *p_context)
int64 MemProInterlockedCompareExchange(int64 volatile *dest, int64 exchange, int64 comperand)
void DestroyFile(void *p_os_file_mem)
void MemProCreateEvent(void *p_os_event_mem, int os_event_mem_size, bool initial_state, bool auto_reset)
void MemProCreateFile(void *p_os_file_mem, int os_file_mem_size)
bool WriteFile(void *p_os_file_mem, const void *p_data, int size)
void DestroyLock(void *p_os_lock_mem)
bool OpenFileForWrite(void *p_os_file_mem, const char *p_filename)
void CreateThread(void *p_os_thread_mem, int os_thread_mem_size)
void CreateSocket(void *p_os_socket_mem, int os_socket_mem_size)
void SPrintF(char *p_dest, int dest_size, const char *p_format, const char *p_str)
int WaitEvent(void *p_os_event_mem, int timeout)
int StartThread(void *p_os_thread_mem, ThreadMain p_thread_main, void *p_param)
void SetThreadName(unsigned int thread_id, const char *p_name)
void CreateLock(void *p_os_lock_mem, int os_lock_mem_size)
bool AcceptSocket(void *p_os_socket_mem, void *p_client_os_socket_mem)
void MemCpy(void *p_dest, int dest_size, const void *p_source, int source_size)
bool SocketSend(void *p_os_socket_mem, void *p_buffer, int size)
bool IsValidSocket(const void *p_os_socket_mem)
void ResetEvent(void *p_os_event_mem)
bool IsThreadAlive(const void *p_os_thread_mem)
void DestroyEvent(void *p_os_event_mem)
void FlushFile(void *p_os_file_mem)
void ReleaseLock(void *p_os_lock_mem)
bool StartListening(void *p_os_socket_mem)
void SetEvent(void *p_os_event_mem)
int64 MemProInterlockedExchangeAdd(int64 volatile *Addend, int64 Value)
int64 GetHiResTimer()
void MemProCreateFile(void *p_os_file_mem, int os_file_mem_size)
void UninitialiseSockets()
bool SocketSend(void *p_os_socket_mem, void *p_buffer, int size)
void SendPageState(bool send_memory, SendPageStateFunction send_page_state_function, void *p_context)
void CreateThread(void *p_os_thread_mem, int os_thread_mem_size)
bool BindSocket(void *p_os_socket_mem, const char *p_port)
void SetEvent(void *p_os_event_mem)
void DestroyEvent(void *p_os_event_mem)
EPlatform GetPlatform()
void MemProCreateEvent(void *p_os_event_mem, int os_event_mem_size, bool initial_state, bool auto_reset)
bool OpenFileForWrite(void *p_os_file_mem, const char *p_filename)
int64 MemProInterlockedCompareExchange(int64 volatile *dest, int64 exchange, int64 comperand)
void MemCpy(void *p_dest, int dest_size, const void *p_source, int source_size)
void CreateLock(void *p_os_lock_mem, int os_lock_mem_size)
int64 GetHiResTimerFrequency()
void DestroyLock(void *p_os_lock_mem)
void ResetEvent(void *p_os_event_mem)
int StartThread(void *p_os_thread_mem, ThreadMain p_thread_main, void *p_param)
bool IsValidSocket(const void *p_os_socket_mem)
void TakeLock(void *p_os_lock_mem)
void MemProEnumerateLoadedModules(EnumerateLoadedModulesCallbackFunction p_callback_function, void *p_context)
void Sleep(int ms)
bool IsThreadAlive(const void *p_os_thread_mem)
void GetStackTrace(void **stack, int &stack_size, unsigned int &hash)
int64 MemProInterlockedExchangeAdd(int64 volatile *Addend, int64 Value)
void GetVirtualMemStats(size_t &reserved, size_t &committed)
void FlushFile(void *p_os_file_mem)
bool WriteFile(void *p_os_file_mem, const void *p_data, int size)
void SwapEndian(unsigned int &value)
void DebugWrite(const char *p_message)
void * Alloc(int size)
bool AcceptSocket(void *p_os_socket_mem, void *p_client_os_socket_mem)
void DestroyFile(void *p_os_file_mem)
void CreateSocket(void *p_os_socket_mem, int os_socket_mem_size)
void ReleaseLock(void *p_os_lock_mem)
int WaitEvent(void *p_os_event_mem, int timeout)
void CloseFile(void *p_os_file_mem)
void DestroyThread(void *p_os_thread_mem)
int SocketReceive(void *p_os_socket_mem, void *p_buffer, int size)
void SetThreadName(unsigned int thread_id, const char *p_name)
void MemProMemoryBarrier()
bool GetExtraModuleInfo(int64 ModuleBase, int &age, void *p_guid, int guid_size, char *p_pdb_filename, int pdb_filename_size)
void SPrintF(char *p_dest, int dest_size, const char *p_format, const char *p_str)
bool StartListening(void *p_os_socket_mem)
Definition MemPro.h:138
bool IsPaused()
void FlushDumpFile()
void(* EnumerateLoadedModulesCallbackFunction)(int64, const char *, void *)
Definition MemPro.h:176
void TrackFree(void *p, bool wait_for_connect=false)
PageState
Definition MemPro.h:145
@ Invalid
Definition MemPro.h:146
@ Reserved
Definition MemPro.h:148
@ Free
Definition MemPro.h:147
@ Committed
Definition MemPro.h:149
void TakeSnapshot(bool send_memory=false)
void(* SendPageStateFunction)(void *, size_t, PageState, PageType, unsigned int, bool, int, void *)
Definition MemPro.h:173
void TrackAlloc(void *p, size_t size, bool wait_for_connect=false)
unsigned long long uint64
Definition MemPro.h:141
void Disconnect()
void Shutdown()
PageType
Definition MemPro.h:154
@ page_Mapped
Definition MemPro.h:157
@ page_Private
Definition MemPro.h:158
@ page_Unknown
Definition MemPro.h:155
@ page_Image
Definition MemPro.h:156
void Initialise(bool wait_for_connect=false)
int(* ThreadMain)(void *)
Definition MemPro.h:170
void DecRef()
void SetPaused(bool paused)
void IncRef()
long long int64
Definition MemPro.h:140
EPlatform
Definition MemPro.h:163
@ Platform_Windows
Definition MemPro.h:164
@ Platform_PS4
Definition MemPro.h:166
@ Platform_Unix
Definition MemPro.h:165
int
Definition TestServer.py:515