use setBuf() func instead

This commit is contained in:
Matt Wells 2015-08-16 22:19:30 -07:00
parent 28644f127e
commit 30693c3cf7
2 changed files with 3 additions and 6 deletions

View File

@ -169,11 +169,8 @@ bool BigFile::addPart ( int32_t n ) {
// avoid a malloc for small files.
// this way we can save in memory RdbMaps upon a core, even malloc/free
// related cores, cuz we won't have to do a malloc to save!
if ( delta <= LITTLEBUFSIZE && ! m_fileBuf.m_buf ) {
m_fileBuf.m_usingStack = true;
m_fileBuf.m_buf = m_littleBuf;
m_fileBuf.m_capacity = LITTLEBUFSIZE;
m_fileBuf.m_length = 0;
if ( delta <= LITTLEBUFSIZE && ! m_fileBuf.getBufStart() ) {
m_fileBuf.setBuf ( m_littleBuf,LITTLEBUFSIZE,0,false);
// do not call reserve() below:
delta = 0;
}

View File

@ -388,7 +388,7 @@ public:
public:
int32_t m_capacity;
int32_t m_length;
//protected:
protected:
char *m_buf;
public:
char *m_label;