/system/core/libcutils/ |
array.c | 29 int capacity; member in struct:Array 47 static int ensureCapacity(Array* array, int capacity) { 48 int oldCapacity = array->capacity; 49 if (capacity > oldCapacity) { 53 if (capacity > MAX_CAPACITY) 56 // Keep doubling capacity until we surpass necessary capacity. 57 while (newCapacity < capacity) { 85 array->capacity = newCapacity;
|
/external/icu4c/common/ |
uvectr64.cpp | 26 capacity(0), 35 capacity(0), 59 capacity = initialCapacity; 121 if (capacity >= minimumCapacity) { 128 if (capacity > (INT32_MAX - 1) / 2) { // integer overflow check 132 int32_t newCap = capacity * 2; 151 capacity = newCap; 161 // Something is very wrong, don't realloc, leave capacity and maxCapacity unchanged 165 if (capacity <= maxCapacity || maxCapacity == 0) { 166 // Current capacity is within the new limit [all...] |
cmemory.h | 144 * must be no more than the capacity of the old array, 196 * Provides an internal array with fixed capacity. Can alias another array 211 MaybeStackArray() : ptr(stackArray), capacity(stackCapacity), needToRelease(FALSE) {} 217 * Returns the array capacity (number of T items). 218 * @return array capacity 220 int32_t getCapacity() const { return capacity; } 230 T *getArrayLimit() const { return getAlias()+capacity; } 254 capacity=otherCapacity; 263 * @param newCapacity can be less than or greater than the current capacity; 274 * and capacity of the clone when clonin 283 int32_t capacity; member in class:MaybeStackArray 456 int32_t capacity; member in class:MaybeStackHeaderAndArray [all...] |
bytestream.cpp | 27 CheckedArrayByteSink::CheckedArrayByteSink(char* outbuf, int32_t capacity) 28 : outbuf_(outbuf), capacity_(capacity < 0 ? 0 : capacity),
|
uvectr32.cpp | 29 capacity(0), 38 capacity(0), 62 capacity = initialCapacity; 203 if (capacity >= minimumCapacity) { 210 if (capacity > (INT32_MAX - 1) / 2) { // integer overflow check 214 int32_t newCap = capacity * 2; 233 capacity = newCap; 243 // Something is very wrong, don't realloc, leave capacity and maxCapacity unchanged 247 if (capacity <= maxCapacity || maxCapacity == 0) { 248 // Current capacity is within the new limit [all...] |
/external/apache-harmony/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ |
CharBufferTest.java | 55 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 57 loadTestData1(array, buf.arrayOffset(), buf.capacity()); 58 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 60 loadTestData2(array, buf.arrayOffset(), buf.capacity()); 61 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 64 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 67 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 72 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 74 loadTestData1(array, buf.arrayOffset(), buf.capacity()); 75 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 750 .capacity() + 1); method [all...] |
/external/chromium/net/base/ |
io_buffer.cc | 86 void GrowableIOBuffer::SetCapacity(int capacity) { 87 DCHECK(capacity >= 0); 89 real_data_.reset(static_cast<char*>(realloc(real_data_.release(), capacity))); 90 capacity_ = capacity; 91 if (offset_ > capacity) 92 set_offset(capacity);
|
/external/qemu/ |
qstring.c | 46 qstring->capacity = qstring->length; 48 qstring->string = qemu_malloc(qstring->capacity + 1); 69 if (qstring->capacity < (qstring->length + len)) { 70 qstring->capacity += len; 71 qstring->capacity *= 2; /* use exponential growth */ 73 qstring->string = qemu_realloc(qstring->string, qstring->capacity + 1);
|
/libcore/luni/src/main/java/java/nio/ |
ReadWriteCharArrayBuffer.java | 35 new ReadWriteCharArrayBuffer(other.capacity(), other.backingArray, other.offset); 46 ReadWriteCharArrayBuffer(int capacity) { 47 super(capacity); 50 ReadWriteCharArrayBuffer(int capacity, char[] backingArray, int arrayOffset) { 51 super(capacity, backingArray, arrayOffset); 63 limit = capacity;
|
ReadWriteDoubleArrayBuffer.java | 36 new ReadWriteDoubleArrayBuffer(other.capacity(), other.backingArray, other.offset); 47 ReadWriteDoubleArrayBuffer(int capacity) { 48 super(capacity); 51 ReadWriteDoubleArrayBuffer(int capacity, double[] backingArray, int arrayOffset) { 52 super(capacity, backingArray, arrayOffset); 64 limit = capacity;
|
ReadWriteFloatArrayBuffer.java | 36 new ReadWriteFloatArrayBuffer(other.capacity(), other.backingArray, other.offset); 47 ReadWriteFloatArrayBuffer(int capacity) { 48 super(capacity); 51 ReadWriteFloatArrayBuffer(int capacity, float[] backingArray, int arrayOffset) { 52 super(capacity, backingArray, arrayOffset); 64 limit = capacity;
|
ReadWriteIntArrayBuffer.java | 35 new ReadWriteIntArrayBuffer(other.capacity(), other.backingArray, other.offset); 46 ReadWriteIntArrayBuffer(int capacity) { 47 super(capacity); 50 ReadWriteIntArrayBuffer(int capacity, int[] backingArray, int arrayOffset) { 51 super(capacity, backingArray, arrayOffset); 63 limit = capacity;
|
ReadWriteLongArrayBuffer.java | 35 new ReadWriteLongArrayBuffer(other.capacity(), other.backingArray, other.offset); 46 ReadWriteLongArrayBuffer(int capacity) { 47 super(capacity); 50 ReadWriteLongArrayBuffer(int capacity, long[] backingArray, int arrayOffset) { 51 super(capacity, backingArray, arrayOffset); 63 limit = capacity;
|
ReadWriteShortArrayBuffer.java | 36 new ReadWriteShortArrayBuffer(other.capacity(), other.backingArray, other.offset); 47 ReadWriteShortArrayBuffer(int capacity) { 48 super(capacity); 51 ReadWriteShortArrayBuffer(int capacity, short[] backingArray, 53 super(capacity, backingArray, arrayOffset); 65 limit = capacity;
|
CharArrayBuffer.java | 42 CharArrayBuffer(int capacity) { 43 this(capacity, new char[capacity], 0); 46 CharArrayBuffer(int capacity, char[] backingArray, int offset) { 47 super(capacity);
|
/external/srec/shared/src/ |
CircularBuffer.c | 34 ESR_ReturnCode CircularBufferCreate(size_t capacity, const LCHAR* mtag, CircularBuffer** buffer) 37 if (buffer == NULL || capacity <= 0) 40 Interface = (CircularBuffer *) MALLOC(sizeof(CircularBuffer) + capacity, mtag); 43 Interface->capacity = capacity; 68 nbRead = buffer->capacity - buffer-> readIdx; 74 if (buffer->readIdx == buffer->capacity) 101 if (buffer->readIdx >= buffer->capacity) 102 buffer->readIdx -= buffer->capacity; 113 size_t available = buffer->capacity - buffer->size [all...] |
/external/icu4c/i18n/ |
nfrlist.h | 39 NFRuleList(uint32_t capacity = 10) 40 : fStuff(capacity ? (NFRule**)uprv_malloc(capacity * sizeof(NFRule*)) : NULL) 42 , fCapacity(capacity) {};
|
/external/srec/shared/include/ |
CircularBuffer.h | 50 * Total buffer capacity. 52 size_t capacity; member in struct:CircularBuffer_t 73 * Creates a circular buffer of the specified capacity. 75 * @param capacity the capacity in number of bytes of the data buffer. 79 ESR_SHARED_API ESR_ReturnCode CircularBufferCreate(size_t capacity, const LCHAR* mtag, CircularBuffer** buffer); 82 * Returns the capacity of the buffer. 84 #define CircularBufferGetCapacity(buffer) ((buffer)->capacity + 0) 99 #define CircularBufferIsFull(buffer) ((buffer)->size == (buffer)->capacity) 109 * Determines the residual capacity of the circular buffer [all...] |
/frameworks/base/include/media/stagefright/foundation/ |
ABuffer.h | 32 ABuffer(size_t capacity); 33 ABuffer(void *data, size_t capacity); 39 size_t capacity() const { return mCapacity; } function in struct:android::ABuffer
|
/libcore/luni/src/main/java/java/util/ |
HashSet.java | 44 * Constructs a new instance of {@code HashSet} with the specified capacity. 46 * @param capacity 47 * the initial capacity of this {@code HashSet}. 49 public HashSet(int capacity) { 50 this(new HashMap<E, HashSet<E>>(capacity)); 54 * Constructs a new instance of {@code HashSet} with the specified capacity 57 * @param capacity 58 * the initial capacity. 62 public HashSet(int capacity, float loadFactor) { 63 this(new HashMap<E, HashSet<E>>(capacity, loadFactor)) [all...] |
/external/icu4c/common/unicode/ |
bytestream.h | 70 * Returns a writable buffer for appending and writes the buffer's capacity to 83 * int32_t capacity; 84 * char* buffer = sink->GetAppendBuffer(..., &capacity); 85 * ... Write n bytes into buffer, with n <= capacity. 91 * If a caller cannot provide a reasonable guess at the desired capacity, 100 * @param min_capacity required minimum capacity of the returned buffer; 102 * @param desired_capacity_hint desired capacity of the returned buffer; 105 * @param scratch_capacity capacity of the scratch buffer 107 * capacity of the returned buffer 137 * This sink will not write more than capacity bytes to outbuf [all...] |
/external/jsilver/src/com/google/clearsilver/jsilver/adaptor/ |
LoadPathToFileCache.java | 37 public LoadPathToFileCache(int capacity) { 38 cache = new LRUCache<String, String>(capacity); 116 private final int capacity; field in class:LoadPathToFileCache.LRUCache 118 LRUCache(int capacity) { 119 super(capacity, 0.75f, true); 120 this.capacity = capacity; 126 * Necessary to override because HashMap increases the capacity of the hashtable before 127 * inserting the elements. However, here we have set the max capacity already and will instead 128 * remove eldest elements instead of increasing capacity [all...] |
/external/icu4c/test/intltest/ |
textfile.cpp | 25 capacity(0), 133 if (capacity <= index) { 149 if (capacity >= mincapacity) { 154 // Note: 'capacity' may be 0 156 for (i = capacity || 1024; i < mincapacity; ) { 172 uprv_strncpy(newbuffer, buffer, capacity); 176 capacity = mincapacity;
|
/external/llvm/include/llvm/ADT/ |
BitVector.h | 33 unsigned Capacity; // Size of allocated memory in BitWord. 73 BitVector() : Size(0), Capacity(0) { 80 Capacity = NumBitWords(s); 81 Bits = (BitWord *)std::malloc(Capacity * sizeof(BitWord)); 82 init_words(Bits, Capacity, t); 91 Capacity = 0; 95 Capacity = NumBitWords(RHS.size()); 96 Bits = (BitWord *)std::malloc(Capacity * sizeof(BitWord)); 97 std::memcpy(Bits, RHS.Bits, Capacity * sizeof(BitWord)); 199 if (N > Capacity * BITWORD_SIZE) [all...] |
/external/valgrind/main/drd/ |
drd_vc.c | 53 vc->capacity = 0; 190 if (new_size > result->capacity) 291 * - size <= capacity. 299 tl_assert(vc->size <= vc->capacity); 308 * Changes capacity, but does not change size. If the size of the memory 315 tl_assert(vc->capacity > VC_PREALLOCATED 319 if (new_capacity > vc->capacity) 321 if (vc->vc && vc->capacity > VC_PREALLOCATED) 325 && vc->capacity > VC_PREALLOCATED); 333 && vc->capacity <= VC_PREALLOCATED) [all...] |