Differences From Artifact [3aacd2e524]:
- File src/OFObject.h — part of check-in [4fbdca698c] at 2020-11-07 20:23:04 on branch trunk — OFObject: Remove -[allocMemoryWithSize:] (user: js, size: 39046) [annotate] [blame] [check-ins using] [more...]
To Artifact [ec746b369b]:
- File
src/OFObject.h
— part of check-in
[627511b032]
at
2020-11-14 12:23:55
on branch trunk
— Rename of_malloc and of_calloc
The new names should be more accurate. (user: js, size: 39101) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
1235 1236 1237 1238 1239 1240 1241 | @end #endif #ifdef __cplusplus extern "C" { #endif /** | | > | | | | | | 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 | @end #endif #ifdef __cplusplus extern "C" { #endif /** * @brief Allocates memory for the specified number of items of the specified * size. * * To free the allocated memory, use `free()`. * * Throws @ref OFOutOfMemoryException if allocating failed and * @ref OFOutOfRangeException if the requested size exceeds the address space. * * @param count The number of items to allocate * @param size The size of each item to allocate * @return A pointer to the allocated memory. May return NULL if the specified * size or count is 0. */ extern void *_Nullable of_alloc(size_t count, size_t size) OF_WARN_UNUSED_RESULT; /** * @brief Allocates memory for the specified number of items of the specified * size and initializes it with zeros. * * To free the allocated memory, use `free()`. * * Throws @ref OFOutOfMemoryException if allocating failed and * @ref OFOutOfRangeException if the requested size exceeds the address space. * * @param size The size of each item to allocate * @param count The number of items to allocate * @return A pointer to the allocated memory. May return NULL if the specified * size or count is 0. */ extern void *_Nullable of_alloc_zeroed(size_t count, size_t size) OF_WARN_UNUSED_RESULT; /** * @brief Resizes memory to the specified number of items of the specified size. * * To free the allocated memory, use `free()`. * * If the pointer is NULL, this is equivalent to allocating memory. * If the size or number of items is 0, this is equivalent to freeing memory. * * Throws @ref OFOutOfMemoryException if allocating failed and |
︙ | ︙ |