コード例 #1
0
ファイル: stubs.cpp プロジェクト: fatman2021/myforthprocessor
StubQueue::StubQueue(StubInterface* stub_interface, int buffer_size,
                     Mutex* lock, const char* name) : _mutex(lock) {
  BufferBlob* blob = BufferBlob::create(round_to(buffer_size, 2*BytesPerWord), name);
  if( blob == NULL ) fatal1( "CodeCache: no room for %s", name);
  _stub_interface  = stub_interface;
  _buffer_size     = blob->instructions_size();
  _buffer_limit    = blob->instructions_size();
  _stub_buffer     = blob->instructions_begin();
  _queue_begin     = 0;
  _queue_end       = 0;
  _number_of_stubs = 0;
  register_queue(this);
}
コード例 #2
0
ファイル: stubs.cpp プロジェクト: gaoxiaojun/dync
StubQueue::StubQueue(StubInterface* stub_interface, int buffer_size,
                     Mutex* lock, const char* name) : _mutex(lock) {
    intptr_t size = round_to(buffer_size, 2*BytesPerWord);
    BufferBlob* blob = BufferBlob::create(name, size);
    if( blob == NULL) {
        vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "CodeCache: no room for %s", name);
    }
    _stub_interface  = stub_interface;
    _buffer_size     = blob->content_size();
    _buffer_limit    = blob->content_size();
    _stub_buffer     = blob->content_begin();
    _queue_begin     = 0;
    _queue_end       = 0;
    _number_of_stubs = 0;
    register_queue(this);
}
コード例 #3
0
ファイル: Pipe.cpp プロジェクト: ricktaylor/indigo
Indigo::Pipe::Pipe(const char* name) :
		m_spin_lock(0)
{
	m_recv_queue = register_queue(name);
}