Searched refs:capacity (Results 1 - 24 of 24) sorted by relevance

/xnu-2782.1.97/libkern/c++/
H A DOSSerialize.cpp72 bzero(&data[length], capacity - length);
77 bzero((void *)data, capacity);
150 // add char, possibly extending our capacity
151 if (length >= capacity && length >=ensureCapacity(capacity+capacityIncrement))
181 capacity = (inCapacity) ? round_page_32(inCapacity) : round_page_32(1);
182 capacityIncrement = capacity;
187 kern_return_t rc = kmem_alloc(kernel_map, (vm_offset_t *)&data, capacity);
193 bzero((void *)data, capacity);
196 ACCUMSIZE(capacity);
[all...]
H A DOSData.cpp64 if (data && (!inCapacity || capacity < inCapacity) ) {
66 kfree(data, capacity);
68 ACCUMSIZE(-capacity);
75 capacity = inCapacity;
106 capacity = EXTERNAL;
190 if (capacity != EXTERNAL && data && capacity) {
191 kfree(data, capacity);
192 ACCUMSIZE( -capacity );
193 } else if (capacity
[all...]
H A DOSArray.cpp78 capacity = inCapacity;
126 OSArray *OSArray::withCapacity(unsigned int capacity) argument
130 if (me && !me->initWithCapacity(capacity)) {
140 unsigned int capacity)
144 if (me && !me->initWithObjects(objects, count, capacity)) {
153 unsigned int capacity)
157 if (me && !me->initWithArray(array, capacity)) {
173 kfree(array, sizeof(const OSMetaClassBase *) * capacity);
174 ACCUMSIZE( -(sizeof(const OSMetaClassBase *) * capacity) );
182 unsigned int OSArray::getCapacity() const { return capacity; }
138 withObjects(const OSObject *objects[], unsigned int count, unsigned int capacity) argument
152 withArray(const OSArray *array, unsigned int capacity) argument
[all...]
H A DOSSet.cpp66 unsigned int capacity = inCount; local
72 capacity = inCapacity;
75 if (!inObjects || !initWithCapacity(capacity))
80 if (members->getCount() < capacity)
105 OSSet *OSSet::withCapacity(unsigned int capacity) argument
109 if (me && !me->initWithCapacity(capacity)) {
119 unsigned int capacity)
123 if (me && !me->initWithObjects(objects, count, capacity)) {
132 unsigned int capacity)
136 if (me && !me->initWithArray(array, capacity)) {
117 withObjects(const OSObject *objects[], unsigned int count, unsigned int capacity) argument
131 withArray(const OSArray *array, unsigned int capacity) argument
144 withSet(const OSSet *set, unsigned int capacity) argument
[all...]
H A DOSOrderedSet.cpp80 capacity = inCapacity;
92 withCapacity(unsigned int capacity, argument
97 if (me && !me->initWithCapacity(capacity, ordering, orderingRef)) {
111 kfree(array, sizeof(_Element) * capacity);
112 ACCUMSIZE( -(sizeof(_Element) * capacity) );
119 unsigned int OSOrderedSet::getCapacity() const { return capacity; }
133 if (newCapacity <= capacity)
134 return capacity;
141 return capacity;
147 oldSize = sizeof(_Element) * capacity;
[all...]
H A DOSDictionary.cpp83 capacity = inCapacity;
196 OSDictionary *OSDictionary::withCapacity(unsigned int capacity) argument
200 if (me && !me->initWithCapacity(capacity)) {
211 unsigned int capacity)
215 if (me && !me->initWithObjects(objects, keys, count, capacity)) {
226 unsigned int capacity)
230 if (me && !me->initWithObjects(objects, keys, count, capacity)) {
239 unsigned int capacity)
243 if (me && !me->initWithDictionary(dict, capacity)) {
256 kfree(dictionary, capacity * sizeo
208 withObjects(const OSObject *objects[], const OSSymbol *keys[], unsigned int count, unsigned int capacity) argument
223 withObjects(const OSObject *objects[], const OSString *keys[], unsigned int count, unsigned int capacity) argument
238 withDictionary(const OSDictionary *dict, unsigned int capacity) argument
[all...]
H A DOSMetaClass.cpp108 unsigned int capacity; member in struct:StalledData
413 if (sStalled->count >= sStalled->capacity) {
415 int oldSize = sStalled->capacity * sizeof(OSMetaClass *);
426 sStalled->capacity += kKModCapacityIncrement;
548 sStalled->capacity = kKModCapacityIncrement;
713 ACCUMSIZE(-(sStalled->capacity * sizeof(OSMetaClass *) +
715 kfree(sStalled->classes, sStalled->capacity * sizeof(OSMetaClass *));
H A DOSSerializeBinary.cpp74 if (newCapacity >= capacity)
102 if (newCapacity >= capacity)
/xnu-2782.1.97/libkern/libkern/c++/
H A DOSSet.h115 * @param capacity The initial storage capacity of the new set object.
123 * <code>capacity</code> must be nonzero.
126 * for which the initial capacity is a hard limit).
128 static OSSet * withCapacity(unsigned int capacity);
140 * @param capacity The initial storage capacity of the new set object.
153 * If <code>capacity</code> is nonzero,
157 * for which the initial capacity is a hard limit).
165 unsigned int capacity
[all...]
H A DOSArray.h98 unsigned int capacity; member in class:OSArray
119 * @param capacity The initial storage capacity of the array object.
126 * <code>capacity</code> must be nonzero.
129 * for which the initial capacity is a hard limit).
131 static OSArray * withCapacity(unsigned int capacity);
142 * @param capacity The initial storage capacity of the array object.
153 * If <code>capacity</code> is nonzero,
157 * for which the initial capacity i
[all...]
H A DOSDictionary.h125 unsigned int capacity; member in class:OSDictionary
146 * @param capacity The initial storage capacity of the new dictionary object.
154 * <code>capacity</code> must be nonzero.
157 * for which the initial capacity is a hard limit).
159 static OSDictionary * withCapacity(unsigned int capacity);
173 * @param capacity The initial storage capacity of the new dictionary object.
186 * If <code>capacity</code> is nonzero,
192 * for which the initial capacity i
[all...]
H A DOSData.h82 unsigned int capacity; member in class:OSData
113 * @param capacity The initial capacity of the OSData object in bytes.
120 * <code>capacity</code> may be zero.
124 * for which a nonzero initial capacity is a hard limit).
126 static OSData * withCapacity(unsigned int capacity);
147 * for which a nonzero initial capacity is a hard limit).
204 * for which a nonzero initial capacity is a hard limit).
229 * for which a nonzero initial capacity is a hard limit).
243 * @param capacity Th
[all...]
H A DOSOrderedSet.h128 unsigned int capacity; member in class:OSOrderedSet
150 * @param capacity The initial storage capacity
162 * <code>capacity</code> must be nonzero.
166 * for which the initial capacity is a hard limit).
184 unsigned int capacity,
195 * @param capacity The initial storage capacity
212 * <code>capacity</code> must be nonzero.
215 * for which the initial capacity i
[all...]
H A DOSSerialize.h92 unsigned int capacity; // of container member in class:OSSerialize
132 * @param capacity The initial size of the XML buffer.
142 static OSSerialize * withCapacity(unsigned int capacity);
/xnu-2782.1.97/iokit/IOKit/
H A DIOBufferMemoryDescriptor.h87 vm_size_t capacity,
96 mach_vm_size_t capacity,
131 * hold capacity bytes. The descriptor's length is initially set to the
132 * capacity.
136 vm_size_t capacity,
141 vm_size_t capacity,
158 @param capacity The number of bytes to allocate.
165 vm_size_t capacity,
180 @param capacity The number of bytes to allocate.
187 mach_vm_size_t capacity,
[all...]
H A DIOInterleavedMemoryDescriptor.h58 @param capacity The maximum number of IOMemoryDescriptors that may be subsequently added to this IOInterleavedMemoryDescriptor.
62 static IOInterleavedMemoryDescriptor * withCapacity( IOByteCount capacity,
68 @param capacity The maximum number of IOMemoryDescriptors that may be subsequently added to this IOInterleavedMemoryDescriptor.
72 virtual bool initWithCapacity( IOByteCount capacity,
77 @discussion Clears each IOMemoryDescriptor by completing (if needed) and releasing. The IOInterleavedMemoryDescriptor is then reset and may accept new descriptors up to the capacity specified when it was created.
H A DIORangeAllocator.h56 UInt32 capacity; member in class:IORangeAllocator
75 @discussion This method initializes an IORangeAllocator and optionally sets the free list to contain one fragment, from zero to an endOfRange parameter. The capacity in terms of free fragments and locking options are set for the instance.
78 @param capacity Sets the initial size of the free list in number of noncontiguous fragments. This value is also used for the capacityIncrement.
84 UInt32 capacity,
89 @discussion This method allocates and initializes an IORangeAllocator and optionally sets the free list to contain one fragment, from zero to an endOfRange parameter. The capacity in terms of free fragments and locking options are set for the instance.
92 @param capacity Sets the initial size of the free list in number of non-contiguous fragments. This value is also used for the capacityIncrement.
98 UInt32 capacity = 0,
114 @discussion This method returns the current capacity of the free fragment list.
115 @result Returns the current capacity of free fragment list.
122 @discussion This method sets the number of extra fragments the free list will expand to when full. It defaults to the initial capacity
[all...]
H A DIOMemoryDescriptor.h943 IOMemoryReference * memoryReferenceAlloc(uint32_t capacity,
/xnu-2782.1.97/iokit/Kernel/
H A DIOBufferMemoryDescriptor.cpp100 vm_size_t capacity,
105 return (initWithPhysicalMask(inTask, options, capacity, alignment, physicalMask));
112 mach_vm_size_t capacity,
124 if (!capacity) return false;
127 _capacity = capacity;
163 capacity = round_page(capacity);
220 capacity = round_page(capacity);
223 capacity, highestMas
98 initWithOptions( IOOptionBits options, vm_size_t capacity, vm_offset_t alignment, task_t inTask) argument
109 initWithPhysicalMask( task_t inTask, IOOptionBits options, mach_vm_size_t capacity, mach_vm_address_t alignment, mach_vm_address_t physicalMask) argument
323 inTaskWithOptions( task_t inTask, IOOptionBits options, vm_size_t capacity, vm_offset_t alignment) argument
338 inTaskWithPhysicalMask( task_t inTask, IOOptionBits options, mach_vm_size_t capacity, mach_vm_address_t physicalMask) argument
355 initWithOptions( IOOptionBits options, vm_size_t capacity, vm_offset_t alignment) argument
364 withOptions( IOOptionBits options, vm_size_t capacity, vm_offset_t alignment) argument
[all...]
H A DIOInterleavedMemoryDescriptor.cpp36 IOByteCount capacity,
48 /* capacity */ capacity,
59 IOByteCount capacity,
68 assert(capacity);
83 _descriptors = IONew(IOMemoryDescriptor *, capacity);
84 _descriptorOffsets = IONew(IOByteCount, capacity);
85 _descriptorLengths = IONew(IOByteCount, capacity);
90 _descriptorCapacity = capacity;
35 withCapacity( IOByteCount capacity, IODirection direction ) argument
58 initWithCapacity( IOByteCount capacity, IODirection direction ) argument
H A DIORangeAllocator.cpp78 capacity = 0;
97 UInt32 capacity,
104 capacity, options )) {
115 IODelete( elements, IORangeAllocatorElement, capacity );
127 return( capacity );
142 if( ((numElements == capacity) && capacityIncrement)
145 newCapacity = capacity + capacityIncrement;
158 IODelete( elements, IORangeAllocatorElement, capacity );
162 capacity = newCapacity;
94 withRange( IORangeScalar endOfRange, IORangeScalar defaultAlignment, UInt32 capacity, IOOptionBits options ) argument
H A DIOMemoryDescriptor.cpp391 uint32_t capacity; member in struct:IOMemoryReference
405 IOGeneralMemoryDescriptor::memoryReferenceAlloc(uint32_t capacity, IOMemoryReference * realloc) argument
412 + capacity * sizeof(ref->entries[0]));
418 + realloc->capacity * sizeof(realloc->entries[0]));
431 ref->capacity = capacity;
449 + ref->capacity * sizeof(ref->entries[0]));
584 if (count >= ref->capacity)
586 ref = memoryReferenceAlloc(ref->capacity + kCapacityInc, ref);
H A DIOPMrootDomain.cpp3244 int i, j, count, capacity; local
3256 if (!array || ((capacity = array->getCount()) == 0))
3260 chosen = OSArray::withCapacity(capacity);
3264 entries = IONew(PMSettingCallEntry, capacity);
3267 memset(entries, 0, sizeof(PMSettingCallEntry) * capacity);
3271 for (i = 0, j = 0; i<capacity; i++)
3308 if (entries) IODelete(entries, PMSettingCallEntry, capacity);
/xnu-2782.1.97/libkern/kxld/
H A Dkxld_array.c43 static KXLDArrayPool * pool_create(size_t capacity);
44 static void pool_destroy(KXLDArrayPool *pool, size_t capacity);
176 pool_create(size_t capacity) argument
183 pool->buffer = kxld_page_alloc(capacity);
185 bzero(pool->buffer, capacity);
191 if (pool) pool_destroy(pool, capacity);
198 pool_destroy(KXLDArrayPool *pool, size_t capacity) argument
201 if (pool->buffer) kxld_page_free(pool->buffer, capacity);

Completed in 129 milliseconds