You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
966 B
42 lines
966 B
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) |
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) |
|
|
|
#pragma once |
|
|
|
#include "allocator.h" |
|
|
|
struct FunctionInfo; |
|
struct ThreadLocalData; |
|
|
|
struct SharedMemoryHeader |
|
{ |
|
int Magic; // Verfication value, always '~SM1' |
|
volatile int ExclusiveAccess; |
|
int TotalLength; |
|
int NativeToManagedBufferOffset; |
|
int ThreadDataOffset; |
|
int ThreadDataLength; |
|
int HeapOffset; |
|
int HeapLength; |
|
void* TargetPointer; |
|
FunctionInfo* RootFuncInfo; |
|
ThreadLocalData* LastThreadListItem; |
|
int ProcFrequency; |
|
bool doNotProfileDotnetInternals; |
|
bool combineRecursiveFunction; |
|
bool trackEvents; |
|
freeListAllocator<FunctionInfoAllocationSize> mallocator; |
|
}; |
|
|
|
class CSharedMemory |
|
{ |
|
public: |
|
CSharedMemory(TCHAR *name); |
|
~CSharedMemory(); |
|
void* GetStartPtr(); |
|
SharedMemoryHeader *header; |
|
private: |
|
HANDLE fileHandle; |
|
void* startPtr; |
|
int length; |
|
};
|
|
|