Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

rpmdb/falloc.c File Reference

The entire file space is thus divided into blocks with a "struct fablock" at the header of each. More...

#include "system.h"
#include <rpmio_internal.h>
#include <rpmmessages.h>
#include <rpmerr.h>
#include "falloc.h"
#include "debug.h"

Go to the source code of this file.

Data Structures

struct  faFileHeader
struct  faFooter
struct  faHeader

RPMIO Utilities.

FDIO_t fadio = &fadio_s

Defines

#define FA_MAGIC   0x02050920

Functions

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 fadSanity (FD_t fd, int offset, const struct faHeader *fh, int printit)
int fadFirstOffset (FD_t fd)
int fadNextOffset (FD_t fd, unsigned int lastOffset)

Variables

struct FDIO_s fadio_s


Detailed Description

The entire file space is thus divided into blocks with a "struct fablock" at the header of each.

The size fields doubly link this block list.

There is an additional free list weaved through the block list, which keeps new allocations fast.

Much of this was inspired by Knuth vol 1.

Definition in file falloc.c.


Function Documentation

int fadSanity ( FD_t fd,
int offset,
const struct faHeader * fh,
int printit ) [static]
 

Definition at line 385 of file falloc.c.

Referenced by fadNextOffset().


Variable Documentation

FDIO_t fadio = &fadio_s
 

Definition at line 447 of file rpmio.c.

struct FDIO_s fadio_s [static]
 

Initial value:

 {
  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  fadOpen, NULL, NULL,  NULL, NULL, NULL, NULL, NULL, NULL
}

Definition at line 46 of file falloc.c.


Generated at Mon Sep 24 10:37:48 2001 for rpm by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001