nckernel  0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
zone.c File Reference
#include <sys/types.h>
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <list.h>
#include <zone.h>
#include <cpu_node.h>
#include <page_frame.h>
#include <page_allocator.h>
#include <debug.h>
Include dependency graph for zone.c:

Go to the source code of this file.

Functions

int create_zone (struct node *node, enum zone_type type, off_t base, size_t size)
 
int destroy_zone (struct zone *zone)
 
struct zonefind_zone (enum zone_type type)
 
struct zonefind_zone_by_addr (void *pma)
 

Function Documentation

int create_zone ( struct node node,
enum zone_type  type,
off_t  base,
size_t  size 
)

Definition at line 19 of file zone.c.

References dbg_printf(), ENOMEM, free(), zone::head, malloc(), zone::managed_page_list, zone::node, page_frame_init(), zone::page_list, and zone::type.

Referenced by vm_frame_init().

Here is the call graph for this function:

Here is the caller graph for this function:

int destroy_zone ( struct zone zone)

Definition at line 93 of file zone.c.

References free(), zone::head, and page_frame_fini().

Referenced by cpu_node_destroy().

Here is the call graph for this function:

Here is the caller graph for this function:

struct zone* find_zone ( enum zone_type  type)

Definition at line 45 of file zone.c.

References list_entry, list_for_each, NULL, and zone::type.

Referenced by page_frame_alloc(), and page_frame_manage().

Here is the caller graph for this function:

struct zone* find_zone_by_addr ( void *  pma)

Definition at line 60 of file zone.c.

References end, zone::handle, list_entry, list_for_each, zone::managed_page_list, NULL, page_allocator_get_region(), page_frame::page_head, and page_frame::pma.

Here is the call graph for this function: