Hi Thomas, Fons will answer your question once he will be back from his trip to the US next week. Rene Brun Thomas Eberl wrote: > > Dear rooters, > > For the following code I have used the recipe given in TMapFile source > about SetMapAddress. Still the result is: > *** Break *** segmentation violation > Aborted > > Why do they not coexist ? The memory areas are not overlapping. > > The code is: > #include <TROOT.h> > #include <TMapFile.h> > #include <TMatrix.h> > > extern void InitGui(); > VoidFuncPtr_t initfuncs[] = { InitGui, 0 }; > > TROOT root("Producer", "Producer for shared mem", initfuncs); > > int main(int argc, char **argv) > > { > > TMapFile::SetMapAddress(0x40a3a000); > TMapFile * mfile = 0; > mfile = TMapFile::Create("RICHonline.map","RECREATE", 1000000, > "Demo memory mapped file with > histograms"); > TMapFile::SetMapAddress(0x40b2f000); > TMapFile * mfile1 = 0; > mfile1 = TMapFile::Create("RICHControl.map","RECREATE", 1000000, > "Demo memory mapped file with histograms"); > > > Int_t n = 2; > TMatrix mat(0,n-1,0,n-1); > TMatrix * p_mat = &mat; > for (int i=0;i<n;i++){ > for (int j=0;j<n;j++){ > mat(i,j) = 5.; > } > } > > > mfile1->TMapFile::Add(p_mat,"TMatrix"); > mfile1->TMapFile::Update(); > mfile->TMapFile::Add(p_mat,"TMatrix"); > mfile->TMapFile::Update(); > > p_mat -> Print(); > > mfile1->Print(); > mfile1->ls(); > mfile->Print(); > mfile->ls(); > > return 0; > } > > -- > Thomas Eberl Phone: (+49 89) 289 1 2425 > Physik-Department E12, Technische Universitaet Muenchen > James-Franck-Strasse *** 85748 Garching b. Muenchen > Email: Thomas.Eberl@physik.tu-muenchen.de
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:33 MET