Lines Matching +full:language +full:- +full:cpp
1 /* ----------------------------------------------------------------------
3 * Title: ArrayMemory.cpp
9 * Target Processor: Cortex-M cores
10 * -------------------------------------------------------------------- */
12 * Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
14 * SPDX-License-Identifier: Apache-2.0
20 * www.apache.org/licenses/LICENSE-2.0
25 * See the License for the specific language governing permissions and
36 this->m_ptr=ptr; in ArrayMemory()
37 this->m_currentPtr=ptr; in ArrayMemory()
38 this->alignSize = aligned; in ArrayMemory()
39 this->tail=tail; in ArrayMemory()
40 this->m_bufferLength = bufferLength; in ArrayMemory()
41 this->m_generation=0; in ArrayMemory()
42 this->memError=false; in ArrayMemory()
51 this->m_ptr=ptr; in ArrayMemory()
52 this->m_currentPtr=ptr; in ArrayMemory()
54 this->alignSize = 8; in ArrayMemory()
55 this->tail=true; in ArrayMemory()
56 this->m_bufferLength = bufferLength; in ArrayMemory()
57 this->m_generation=0; in ArrayMemory()
58 this->memError=false; in ArrayMemory()
66 return(this->memError); in HasMemError()
71 if (this->tail) in getTailSize()
90 tailSize = this->getTailSize(); in NewBuffer()
93 if (this->alignSize > 0) in NewBuffer()
98 offset=(unsigned long)(this->m_currentPtr - this->m_ptr); in NewBuffer()
99 pad = this->alignSize*ceil(1.0*offset / (1.0*this->alignSize)) - offset; in NewBuffer()
101 this->m_currentPtr += pad; in NewBuffer()
105 if (this->m_currentPtr + length + tailSize < this->m_ptr + m_bufferLength) in NewBuffer()
107 char *result=this->m_currentPtr; in NewBuffer()
108 this->m_currentPtr += length + tailSize; in NewBuffer()
114 this->memError=true; in NewBuffer()
130 for(unsigned long i=0; i < this->getTailSize() ; i++) in IsTailEmpty()
163 memset(this->m_ptr, 0, this->m_bufferLength); in FreeMemory()
165 this->m_currentPtr=this->m_ptr; in FreeMemory()
166 this->m_generation++; in FreeMemory()
167 this->memError=false; in FreeMemory()