| 607 | } |
| 608 | |
| 609 | auto RamFs::AllocateFileData(size_t size) -> void* { |
| 610 | // Align up to 16 bytes |
| 611 | size_t aligned = (size + 15UL) & ~15UL; |
| 612 | if (file_data_pool_used_ + aligned > kFileDataPoolSize) { |
| 613 | return nullptr; |
| 614 | } |
| 615 | void* ptr = &file_data_pool_[file_data_pool_used_]; |
| 616 | file_data_pool_used_ += aligned; |
| 617 | return ptr; |
| 618 | } |
| 619 | |
| 620 | auto RamFs::AllocateDirEntries(size_t count) -> RamDirEntry* { |
| 621 | size_t bytes = count * sizeof(RamDirEntry); |
nothing calls this directly
no outgoing calls
no test coverage detected