# alloc method | |
int alloc | |
(int size, int nextOutOfLineDepth) | |
## Implementation | |
```dart | |
int alloc(int size, int nextOutOfLineDepth) { | |
if (nextOutOfLineDepth > _maxOutOfLineDepth) { | |
throw FidlError('Exceeded maxOutOfLineDepth', | |
FidlErrorCode.fidlExceededMaxOutOfLineDepth); | |
} | |
int offset = _extent; | |
_claimBytes(align(size)); | |
return offset; | |
} | |
``` | |