Go to the source code of this file.
Functions | |
| long int | fadGetFileSize (FD_t fd) |
| void | fadSetFileSize (FD_t fd, long int fileSize) |
| unsigned int | fadGetFirstFree (FD_t fd) |
| void | fadSetFirstFree (FD_t fd, unsigned int firstFree) |
| FD_t | fadOpen (const char *path, int flags, mode_t perms) |
| unsigned int | fadAlloc (FD_t fd, unsigned int size) |
| void | fadFree (FD_t fd, unsigned int offset) |
| int | fadFirstOffset (FD_t fd) |
| int | fadNextOffset (FD_t fd, unsigned int lastoff) |
Best fit allocation is used, free blocks are compacted. Minimal fragmentation is more important then speed. This uses 32 bit offsets on all platforms and should be byte order independent.
Definition in file falloc.h.
|
||||||||||||
|
Definition at line 144 of file falloc.c. References _, alloca(), EXIT_FAILURE, FA_MAGIC, fadGetFileSize(), fadGetFirstFree(), fadSetFileSize(), fadSetFirstFree(), faFileHeader::firstFree, faHeader::freeNext, faHeader::freePrev, faFooter::isFree, faHeader::isFree, faFileHeader::magic, Pread(), Pwrite(), RPMERR_FREELIST, rpmError, faFooter::size, and faHeader::size. Referenced by db1cget(). |
|
|
Definition at line 462 of file falloc.c. References fadNextOffset(). Referenced by db1cget(). |
|
||||||||||||
|
Definition at line 334 of file falloc.c. References FA_MAGIC, fadGetFirstFree(), fadSetFirstFree(), faFileHeader::firstFree, faHeader::freeNext, faHeader::freePrev, faFooter::isFree, faHeader::isFree, faFileHeader::magic, Pread(), Pwrite(), and faHeader::size. Referenced by db1cdel(). |
|
|
Definition at line 19 of file falloc.h. References _FD_s::fileSize. Referenced by doGetRecord(), fadAlloc(), fadNextOffset(), and fadOpen(). |
|
|
Definition at line 29 of file falloc.h. References _FD_s::firstFree. Referenced by fadAlloc(), and fadFree(). |
|
||||||||||||
|
Definition at line 467 of file falloc.c. References fadGetFileSize(), fadSanity(), faHeader::isFree, Pread(), and faHeader::size. Referenced by db1cget(), doGetRecord(), and fadFirstOffset(). |
|
||||||||||||||||
|
Definition at line 85 of file falloc.c. References FDIO_s::_open, FA_MAGIC, fadGetFileSize(), fadSetFileSize(), fadSetFirstFree(), Fclose(), fdSetIo(), Ferror(), faFileHeader::firstFree, Fseek(), Fwrite(), faFileHeader::magic, Pread(), and SEEK_END. Referenced by db1open(). |
|
||||||||||||
|
Definition at line 23 of file falloc.h. References _FD_s::fileSize. Referenced by fadAlloc(), and fadOpen(). |
|
||||||||||||
|
Definition at line 33 of file falloc.h. References _FD_s::firstFree. Referenced by fadAlloc(), fadFree(), and fadOpen(). |
1.2.18