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

Go to the source code of this file.

Functions

void * page_frame_alloc (enum zone_type zone_type, size_t nr_of_pages)
 
int page_frame_fini (struct zone *zone)
 
int page_frame_free (void *page)
 할당 된 페이지 자원을 해제 한다. More...
 
int page_frame_init (struct zone *zone, void *base, size_t size)
 
int page_frame_manage (enum zone_type type, void *page, int nr_of_pages)
 페이지 프레임 관리자가 전달된 페이지를 관리 목록에 추가한다. More...
 
int page_frame_ref (void *page)
 주어진 페이지의 참조 횟수를 증가 시킨다. More...
 
int page_frame_refcnt (void *page)
 해당 페이지가 참조 된 수 More...
 

Function Documentation

void* page_frame_alloc ( enum zone_type zone_type  ,
size_t  nr_of_pages 
)
Note
nr_of_pages 는 1,2,4,8 과 같이 2의 멱수 이어야 한다.

Definition at line 92 of file page_frame.c.

References dbg_printf(), find_zone(), free(), malloc(), NEED_LOCK_TEST_BEGIN, NEED_LOCK_TEST_END, NULL, page_allocator_alloc(), page_frame::page_head, page_frame::pma, pthread_mutex_lock(), pthread_mutex_unlock(), and page_frame::refcnt.

Here is the call graph for this function: