15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
* file.
*/
#import "OFException.h"
OF_ASSUME_NONNULL_BEGIN
/*!
* @class OFOutOfMemoryException \
* OFOutOfMemoryException.h ObjFW/OFOutOfMemoryException.h
*
* @brief An exception indicating there is not enough memory available.
*/
@interface OFOutOfMemoryException: OFException
{
size_t _requestedSize;
}
/*!
* @brief The size of the memory that could not be allocated.
*/
@property (readonly, nonatomic) size_t requestedSize;
/*!
* @brief Creates a new, autoreleased no memory exception.
*
* @param requestedSize The size of the memory that could not be allocated
* @return A new, autoreleased no memory exception
*/
+ (instancetype)exceptionWithRequestedSize: (size_t)requestedSize;
/*!
* @brief Initializes an already allocated no memory exception.
*
* @param requestedSize The size of the memory that could not be allocated
* @return An initialized no memory exception
*/
- (instancetype)initWithRequestedSize: (size_t)requestedSize
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
|
|
|
|
|
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
* file.
*/
#import "OFException.h"
OF_ASSUME_NONNULL_BEGIN
/**
* @class OFOutOfMemoryException \
* OFOutOfMemoryException.h ObjFW/OFOutOfMemoryException.h
*
* @brief An exception indicating there is not enough memory available.
*/
@interface OFOutOfMemoryException: OFException
{
size_t _requestedSize;
}
/**
* @brief The size of the memory that could not be allocated.
*/
@property (readonly, nonatomic) size_t requestedSize;
/**
* @brief Creates a new, autoreleased no memory exception.
*
* @param requestedSize The size of the memory that could not be allocated
* @return A new, autoreleased no memory exception
*/
+ (instancetype)exceptionWithRequestedSize: (size_t)requestedSize;
/**
* @brief Initializes an already allocated no memory exception.
*
* @param requestedSize The size of the memory that could not be allocated
* @return An initialized no memory exception
*/
- (instancetype)initWithRequestedSize: (size_t)requestedSize
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|