File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -274,15 +274,15 @@ internal struct _ContiguousArrayBuffer<Element>: _ArrayBufferProtocol {
274
274
realMinimumCapacity. _builtinWordValue, Element . self)
275
275
276
276
let storageAddr = UnsafeMutableRawPointer ( Builtin . bridgeToRawPointer ( _storage) )
277
- if let allocSize = _mallocSize ( ofAllocation: storageAddr) {
278
- let endAddr = storageAddr + allocSize
279
- let realCapacity = endAddr. assumingMemoryBound ( to: Element . self) - firstElementAddress
280
- _initStorageHeader (
281
- count: uninitializedCount, capacity: realCapacity)
282
- } else {
277
+ // if let allocSize = _mallocSize(ofAllocation: storageAddr) {
278
+ // let endAddr = storageAddr + allocSize
279
+ // let realCapacity = endAddr.assumingMemoryBound(to: Element.self) - firstElementAddress
280
+ // _initStorageHeader(
281
+ // count: uninitializedCount, capacity: realCapacity)
282
+ // } else {
283
283
_initStorageHeader (
284
284
count: uninitializedCount, capacity: realMinimumCapacity)
285
- }
285
+ // }
286
286
}
287
287
}
288
288
Original file line number Diff line number Diff line change @@ -206,17 +206,17 @@ fileprivate func _allocate<T: AnyObject>(
206
206
let totalTailBytes = total - numHeaderBytes
207
207
208
208
let object = tailAllocator ( totalTailBytes)
209
- if let allocSize = _mallocSize ( ofAllocation:
210
- UnsafeRawPointer ( Builtin . bridgeToRawPointer ( object) ) ) {
211
- _internalInvariant ( allocSize % MemoryLayout< Int> . stride == 0 )
212
-
213
- let realNumTailBytes = allocSize - numHeaderBytes
214
- _internalInvariant ( realNumTailBytes >= numTailBytes)
215
-
216
- return ( object, realNumTailBytes)
217
- } else {
209
+ // if let allocSize = _mallocSize(ofAllocation:
210
+ // UnsafeRawPointer(Builtin.bridgeToRawPointer(object))) {
211
+ // _internalInvariant(allocSize % MemoryLayout<Int>.stride == 0)
212
+ //
213
+ // let realNumTailBytes = allocSize - numHeaderBytes
214
+ // _internalInvariant(realNumTailBytes >= numTailBytes)
215
+ //
216
+ // return (object, realNumTailBytes)
217
+ // } else {
218
218
return ( object, totalTailBytes)
219
- }
219
+ // }
220
220
}
221
221
222
222
fileprivate func _allocateStringStorage(
You can’t perform that action at this time.
0 commit comments