24 #if !defined(__MMPRIVATE_H) && !defined(__CINT__)
25 #include "mmprivate.h"
88 void operator delete(
void *vp);
169 return (
void *)((
struct mdesc *)
fMmallocDesc)->breakval;
176 if (!
gROOT || !
gROOT->GetListOfMappedFiles())
return 0;
TMapRec * GetLast() const
TMapRec * fNext
Next MapRec in list.
void * GetMmallocDesc() const
TObject * Remove(TObject *obj)
This class implements a shared memory region mapped to a file.
void Print(Option_t *option="") const
Print some info about the mapped file.
static TMapFile * Create(const char *name, Option_t *option="READ", Int_t size=kDefaultMapSize, const char *title="")
Create a memory mapped file.
static void SetMapAddress(Long_t addr)
Set preferred map address.
static Long_t fgMapAddress
Map to this address, set address via SetMapAddress()
R__EXTERN void * gMmallocDesc
TMapFile * FindShadowMapFile()
Returns shadow map file.
virtual ~TMapFile()
TMapFiles may not be deleted, since we want to keep the complete TMapFile object in the mapped file f...
void operator=(const TMapFile &rhs)
Int_t fSize
Original start size of memory mapped region.
const char * GetTitle() const
Returns title of object.
Int_t fVersion
ROOT version (or -1 for shadow map file)
char * fTitle
Title of mapped file.
Int_t ReleaseSemaphore()
Release semaphore. Returns 0 if OK, -1 on error.
void CreateSemaphore(Int_t pid=0)
Create semaphore used for synchronizing access to shared memory.
Int_t fBufSize
Buffer size.
TDirectory * GetDirectory() const
void Update(TObject *obj=0)
Update an object (or all objects, if obj == 0) in shared memory.
static void * MapToAddress()
Return the base address at which we would like the next TMapFile's mapped data to start...
TObject * fGetting
Don't deadlock in update mode, when from Get() Add() is called.
TObject * Get(const char *name, TObject *retObj=0)
Return pointer to object retrieved from shared memory.
void * fMmallocDesc
Pointer to mmalloc descriptor.
Int_t GetBestBuffer()
Return the best buffer size for objects in this file.
Int_t fWritten
Number of objects written sofar.
TObject * fObject
Pointer to original object.
TMapRec * fLast
Last object in list of shared objects.
Double_t fSum2Buffer
Sum of squares of buffer sizes of objects written so far.
void InitDirectory()
Create the directory associated to this mapfile.
#define ClassDef(name, id)
ULong_t fBaseAddr
Base address of mapped memory region.
Double_t fSumBuffer
Sum of buffer sizes of objects written sofar.
ULong_t fhSemaphore
HANDLE of WIN32 Mutex object to implement semaphore.
const char * GetOption() const
Bool_t IsWritable() const
void Add(const TObject *obj, const char *name="")
Add an object to the list of objects to be stored in shared memory.
void * OrgAddress(void *addr) const
Bool_t fWritable
TRUE if mapped file opened in RDWR mode.
void ls(Option_t *option="") const
List contents of TMapFile.
Using a TBrowser one can browse all ROOT objects.
void * fBuffer
Buffer containing object of class name.
void * GetBuffer(Long_t offset=0) const
TObject * GetObject() const
This method returns a pointer to the original object.
Int_t AcquireSemaphore()
Acquire semaphore. Returns 0 if OK, -1 on error.
TObject * GetObject() const
void * GetBaseAddr() const
TMapRec * GetNext(Long_t offset=0) const
char * fOption
Directory creation options.
void SumBuffer(Int_t bufsize)
Increment statistics for buffer sizes of objects in this file.
TObject * Remove(const char *name)
Int_t fFd
Descriptor of mapped file.
const char * GetName() const
Returns name of object.
const char * GetClassName(Long_t offset=0) const
static void * fgMmallocDesc
Used in Close() and operator delete()
void * GetBreakval() const
Return the current location in the memory region for this malloc heap which represents the end of mem...
TObject * Remove(TObject *obj, Bool_t lock)
Remove object from shared memory.
Describe directory structure in memory.
Wrapper around a TObject so it can be stored in a TList.
Bool_t IsFolder() const
Returns kTRUE in case object is a folder (i.e. contains browsable lists).
Keep track of an object in the mapped file.
Int_t fSemaphore
Modification semaphore (or getpid() for WIN32)
Mother of all ROOT objects.
TMapRec * fFirst
List of streamed objects is shared memory.
const char * GetName(Long_t offset=0) const
char * fClassName
Class name.
void RemoveAll()
Remove all objects from shared memory.
void DeleteSemaphore()
Delete the semaphore.
Bool_t cd(const char *path=0)
Cd to associated directory.
Long_t fOffset
Offset in bytes for region mapped by reader.
void Browse(TBrowser *b)
Browse contents of TMapFile.
TList * fBrowseList
List of KeyMapFile objects.
void Close(Option_t *option="")
Close a mapped file.
TDirectory * fDirectory
Pointer to directory associated to this mapfile.
char * fName
Name of mapped file.
static TMapFile * WhichMapFile(void *addr)
TMapRec * GetFirst() const
TMapRec & operator=(const TMapRec &)