/*
* Copyright 2009 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "shark/llvmHeaders.hpp"
#include "shark/sharkEntry.hpp"
// SharkMemoryManager wraps the LLVM JIT Memory Manager. We could use
// this to run our own memory allocation policies, but for now all we
// use it for is figuring out where the resulting native code ended up.
public:
private:
private:
return _mm;
}
private:
public:
SharkEntry* entry) {
}
return _entry_map[function];
}
public:
void AllocateGOT();
unsigned char* getGOTBase() const;
unsigned StubSize,
unsigned Alignment);
unsigned char* FunctionStart,
unsigned char* FunctionEnd);
unsigned char* TableStart,
unsigned char* TableEnd,
unsigned char* FrameRegister);
#if SHARK_LLVM_VERSION < 27
void* getDlsymTable() const;
void SetDlsymTable(void *ptr);
#endif
void setPoisonMemory(bool);
void setMemoryWritable();
void setMemoryExecutable();
#if SHARK_LLVM_VERSION >= 27
void deallocateExceptionTable(void *ptr);
void deallocateFunctionBody(void *ptr);
#else
#endif
unsigned int Alignment);
};
#endif // SHARE_VM_SHARK_SHARKMEMORYMANAGER_HPP