MprBuf::MprBuf(int initialSize, int max) { buf = 0; refillProc = 0; refillArg = 0; setBuf(initialSize, max); }
int ExynosJpegDecoder::setInBuf(char *pcBuf, int iSize) { int iRet = ERROR_NONE; iRet = setBuf(&t_stJpegInbuf, &pcBuf, &iSize, NUM_JPEG_DEC_IN_PLANES); if (iRet == ERROR_NONE) t_bFlagCreateInBuf = true; return iRet; }
int ExynosJpegDecoder::setOutBuf(int *piBuf, int *iSize) { int iRet = ERROR_NONE; iRet = setBuf(&t_stJpegOutbuf, piBuf, iSize, t_iPlaneNum); if (iRet == ERROR_NONE) t_bFlagCreateOutBuf = true; return iRet; }
void linex_node_handler::traverseToLeaf(byte *node_paths[]) { byte level; level = 1; if (isPut) *node_paths = buf; while (!isLeaf()) { int16_t idx = locate(); if (idx < 0) { idx = ~idx; if (idx) idx--; key_at = prev_key_at; } setBuf(getChildPtr(key_at)); if (isPut) node_paths[level++] = buf; } }
//------------------------------------------------------------------------------ Message::Message() throw (std::exception) { //throws in case fatal error occurred if (! ms_maxSize) throw std::logic_error("MaxSize was NOT initialized"); if (ms_maxSize < MsgHeader::EFFECTIVE_SIZE) throw std::out_of_range("maxSize < MsgHeader::EFFECTIVE_SIZE"); m_buf = MALLOC(ms_maxSize + 7); // extra +7 for enabling 8 alignment of m_sequence_number if (! m_buf) { throw MemException(__FILE__, __LINE__, "malloc", ms_maxSize); } setBuf(); for (int len = 0; len < ms_maxSize; len++) m_addr[len] = (uint8_t) rand(); memset(m_header, 0, MsgHeader::EFFECTIVE_SIZE); /* log_msg("ms_maxSize=%d, m_buf=%p, alignment=%d, m_data=%p, m_header=%p", ms_maxSize, m_buf, alignment, m_data, m_header); log_msg("header adresses: m_sequence_number=%p", &m_header->m_sequence_number); //*/ }
linex_node_handler::linex_node_handler(byte *b) { setBuf(b); isPut = false; }