Skip to content

Commit

Permalink
Add dyninstAPI/src/codegen.C
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent e9c6331 commit fe654cc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion docs/dyninstAPI/developer/codegen.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ codegen.h

.. cpp:function:: codeGen(unsigned size)

Make a generation buffer with the given size
Make a generation buffer of ``size`` *bytes*.

.. cpp:function:: codeGen(codeBuf_t *buf, int size)

Expand Down
5 changes: 0 additions & 5 deletions dyninstAPI/src/codegen.C
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ codeGen::codeGen() :
modifiedStackFrame_(false)
{}

// size is in bytes
codeGen::codeGen(unsigned size) :
buffer_(NULL),
offset_(0),
Expand Down Expand Up @@ -111,7 +110,6 @@ codeGen::codeGen(unsigned size) :
memset(buffer_, 0, size+codeGenPadding);
}

// size is in bytes
codeGen::codeGen(codeBuf_t *buffer, int size) :
buffer_(buffer),
offset_(0),
Expand Down Expand Up @@ -145,7 +143,6 @@ codeGen::~codeGen() {
}
}

// Deep copy
codeGen::codeGen(const codeGen &g) :
buffer_(NULL),
offset_(g.offset_),
Expand Down Expand Up @@ -236,7 +233,6 @@ void codeGen::allocate(unsigned size)
assert(buffer_);
}

// Very similar to destructor
void codeGen::invalidate() {
if (allocated_ && buffer_) {
free(buffer_);
Expand Down Expand Up @@ -346,7 +342,6 @@ void codeGen::copyAligned(const void *b, const unsigned size) {



// codeBufIndex_t stores in platform-specific units.
unsigned codeGen::used() const {
return offset_ * CODE_GEN_OFFSET_SIZE;
}
Expand Down

0 comments on commit fe654cc

Please sign in to comment.