DataBlock.hh (8608:02d7ac5fb855) DataBlock.hh (9181:42807286d6cb)
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 15 unchanged lines hidden (view full) ---

24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#ifndef __MEM_RUBY_COMMON_DATABLOCK_HH__
30#define __MEM_RUBY_COMMON_DATABLOCK_HH__
31
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 15 unchanged lines hidden (view full) ---

24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#ifndef __MEM_RUBY_COMMON_DATABLOCK_HH__
30#define __MEM_RUBY_COMMON_DATABLOCK_HH__
31
32#include <cassert>
32#include <iomanip>
33#include <iostream>
34
35#include "mem/ruby/common/TypeDefines.hh"
36
37class DataBlock
38{
39 public:

--- 27 unchanged lines hidden (view full) ---

67 void alloc();
68 uint8* m_data;
69 bool m_alloc;
70};
71
72inline void
73DataBlock::assign(uint8* data)
74{
33#include <iomanip>
34#include <iostream>
35
36#include "mem/ruby/common/TypeDefines.hh"
37
38class DataBlock
39{
40 public:

--- 27 unchanged lines hidden (view full) ---

68 void alloc();
69 uint8* m_data;
70 bool m_alloc;
71};
72
73inline void
74DataBlock::assign(uint8* data)
75{
76 assert(data != NULL);
75 if (m_alloc) {
76 delete [] m_data;
77 }
78 m_data = data;
79 m_alloc = false;
80}
81
82inline uint8

--- 32 unchanged lines hidden ---
77 if (m_alloc) {
78 delete [] m_data;
79 }
80 m_data = data;
81 m_alloc = false;
82}
83
84inline uint8

--- 32 unchanged lines hidden ---