src/share/vm/shark/sharkMemoryManager.hpp

Print this page
rev 3850 : [mq]: shark.patch


  58     return _entry_map[function];
  59   }
  60 
  61  public:
  62   void AllocateGOT();
  63   unsigned char* getGOTBase() const;
  64   unsigned char* allocateStub(const llvm::GlobalValue* F,
  65                               unsigned StubSize,
  66                               unsigned Alignment);
  67   unsigned char* startFunctionBody(const llvm::Function* F,
  68                                    uintptr_t& ActualSize);
  69   void endFunctionBody(const llvm::Function* F,
  70                        unsigned char* FunctionStart,
  71                        unsigned char* FunctionEnd);
  72   unsigned char* startExceptionTable(const llvm::Function* F,
  73                                      uintptr_t& ActualSize);
  74   void endExceptionTable(const llvm::Function* F,
  75                          unsigned char* TableStart,
  76                          unsigned char* TableEnd,
  77                          unsigned char* FrameRegister);
  78 #if SHARK_LLVM_VERSION < 27
  79   void* getDlsymTable() const;
  80   void SetDlsymTable(void *ptr);
  81 #endif
  82   void setPoisonMemory(bool);
  83   uint8_t* allocateGlobal(uintptr_t, unsigned int);
  84   void setMemoryWritable();
  85   void setMemoryExecutable();
  86 #if SHARK_LLVM_VERSION >= 27
  87   void deallocateExceptionTable(void *ptr);
  88   void deallocateFunctionBody(void *ptr);
  89 #else
  90   void deallocateMemForFunction(const llvm::Function* F);
  91 #endif
  92   unsigned char *allocateSpace(intptr_t Size,
  93                                unsigned int Alignment);
  94 };
  95 
  96 #endif // SHARE_VM_SHARK_SHARKMEMORYMANAGER_HPP


  58     return _entry_map[function];
  59   }
  60 
  61  public:
  62   void AllocateGOT();
  63   unsigned char* getGOTBase() const;
  64   unsigned char* allocateStub(const llvm::GlobalValue* F,
  65                               unsigned StubSize,
  66                               unsigned Alignment);
  67   unsigned char* startFunctionBody(const llvm::Function* F,
  68                                    uintptr_t& ActualSize);
  69   void endFunctionBody(const llvm::Function* F,
  70                        unsigned char* FunctionStart,
  71                        unsigned char* FunctionEnd);
  72   unsigned char* startExceptionTable(const llvm::Function* F,
  73                                      uintptr_t& ActualSize);
  74   void endExceptionTable(const llvm::Function* F,
  75                          unsigned char* TableStart,
  76                          unsigned char* TableEnd,
  77                          unsigned char* FrameRegister);
  78   void *getPointerToNamedFunction(const std::string &Name, bool AbortOnFailure = true);
  79   uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, unsigned SectionID);
  80   uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, unsigned SectionID);

  81   void setPoisonMemory(bool);
  82   uint8_t* allocateGlobal(uintptr_t, unsigned int);
  83   void setMemoryWritable();
  84   void setMemoryExecutable();

  85   void deallocateExceptionTable(void *ptr);
  86   void deallocateFunctionBody(void *ptr);



  87   unsigned char *allocateSpace(intptr_t Size,
  88                                unsigned int Alignment);
  89 };
  90 
  91 #endif // SHARE_VM_SHARK_SHARKMEMORYMANAGER_HPP