Differences From Artifact [de9178b4e4]:
- File
src/OFSecureData.m
— part of check-in
[3d8286feee]
at
2020-11-04 23:18:25
on branch trunk
— Remove of_free()
While it makes sense to wrap malloc and calloc to replace the error
checking with exceptions, it does not make sense to wrap free. (user: js, size: 14705) [annotate] [blame] [check-ins using]
To Artifact [3742a91d29]:
- File src/OFSecureData.m — part of check-in [1a70abc65d] at 2020-11-06 01:11:51 on branch trunk — OF*Data: Avoid -[allocMemoryWithSize:] (user: js, size: 14696) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
411 412 413 414 415 416 417 | size_t pageSize = [OFSystemInfo pageSize]; #endif if (count > SIZE_MAX / itemSize) @throw [OFOutOfRangeException exception]; if (allowsSwappableMemory) { | | | | 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 | size_t pageSize = [OFSystemInfo pageSize]; #endif if (count > SIZE_MAX / itemSize) @throw [OFOutOfRangeException exception]; if (allowsSwappableMemory) { _items = of_malloc(count, itemSize); _freeWhenDone = true; memset(_items, 0, count * itemSize); #if defined(HAVE_MMAP) && defined(HAVE_MLOCK) && defined(MAP_ANON) } else if (count * itemSize >= pageSize) _items = mapPages(OF_ROUND_UP_POW2(pageSize, count * itemSize) / pageSize); else { # if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS) |
︙ | ︙ |