Skip to content

File falloc.c

FileList > common > falloc > falloc.c

Go to the source code of this file

  • #include "falloc.h"
  • #include <stdbool.h>
  • #include <stdint.h>
  • #include <stdio.h>
  • #include <stdlib.h>

Classes

Type Name
struct Block

Public Static Attributes

Type Name
struct Block allocated_list = {.size = -1, .next = NULL, .dptr = 0}
struct Block free_list = {.size = -1, .next = NULL, .dptr = 0}
FILE * logf = NULL

Public Functions

Type Name
int falloc_addr_malloc (uintptr_t addr, size_t size)
void falloc_clean ()
int falloc_free (void * devPtr)
void falloc_init (uintptr_t start, size_t size, int log)
int falloc_malloc (void ** devPtr, size_t size)
void falloc_mem_log (int op, uintptr_t value)
void log_list (struct Block * list_head)

Public Static Functions

Type Name
uintptr_t align (size_t n)

Public Static Attributes Documentation

variable allocated_list

struct Block allocated_list;

variable free_list

struct Block free_list;

variable logf

FILE* logf;

Public Functions Documentation

function falloc_addr_malloc

int falloc_addr_malloc (
    uintptr_t addr,
    size_t size
) 

function falloc_clean

void falloc_clean () 

function falloc_free

int falloc_free (
    void * devPtr
) 

function falloc_init

void falloc_init (
    uintptr_t start,
    size_t size,
    int log
) 

function falloc_malloc

int falloc_malloc (
    void ** devPtr,
    size_t size
) 

function falloc_mem_log

void falloc_mem_log (
    int op,
    uintptr_t value
) 

function log_list

void log_list (
    struct Block * list_head
) 

Public Static Functions Documentation

function align

static inline uintptr_t align (
    size_t n
) 


The documentation for this class was generated from the following file projects/formosa-driver/src/common/falloc/falloc.c